mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Added assumption when no time is supplied (#8855)
* Added assumption when no time is supplied * Changed format of date * Set now options when date is specified
This commit is contained in:
committed by
Sabe Jones
parent
b3f9fd09c6
commit
3fa0b72ffe
@@ -101,6 +101,7 @@ export function shouldDo (day, dailyTask, options = {}) {
|
||||
}
|
||||
let o = sanitizeOptions(options);
|
||||
let startOfDayWithCDSTime = startOfDay(defaults({ now: day }, o));
|
||||
|
||||
// The time portion of the Start Date is never visible to or modifiable by the user so we must ignore it.
|
||||
// Therefore, we must also ignore the time portion of the user's day start (startOfDayWithCDSTime), otherwise the date comparison will be wrong for some times.
|
||||
// NB: The user's day start date has already been converted to the PREVIOUS day's date if the time portion was before CDS.
|
||||
|
||||
Reference in New Issue
Block a user