mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-17 03:22:14 +00:00
Removed extra codes
This commit is contained in:
parent
f192ca4c6f
commit
a82b60f144
2 changed files with 2 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ export function shouldDo (day, dailyTask, options = {}) {
|
|||
} else if (dailyTask.frequency === 'monthly') {
|
||||
let schedule = moment(startDate).recur();
|
||||
|
||||
let differenceInMonths = moment(day).month() + 1 - moment(startDate).month() + 1;
|
||||
let differenceInMonths = moment(day).month() - moment(startDate).month();
|
||||
let matchEveryX = differenceInMonths % dailyTask.everyX === 0;
|
||||
|
||||
if (dailyTask.weeksOfMonth && dailyTask.weeksOfMonth.length > 0) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ async function _validateTaskAlias (tasks, res) {
|
|||
export function setNextDue (task, user) {
|
||||
if (task.type !== 'daily') return;
|
||||
|
||||
let optionsForShouldDo = cloneDeep(user.preferences.toObject());
|
||||
let optionsForShouldDo = user.preferences.toObject();
|
||||
task.isDue = shared.shouldDo(Date.now(), task, optionsForShouldDo);
|
||||
optionsForShouldDo.nextDue = true;
|
||||
let nextDue = shared.shouldDo(Date.now(), task, optionsForShouldDo);
|
||||
|
|
|
|||
Loading…
Reference in a new issue