date warning change
This commit is contained in:
parent
260bbac368
commit
c931762244
@ -125,7 +125,7 @@ export const getLocaleMonth = (date: Date, locale: string) => {
|
|||||||
*/
|
*/
|
||||||
const getMonday = (date: Date) => {
|
const getMonday = (date: Date) => {
|
||||||
const day = date.getDay();
|
const day = date.getDay();
|
||||||
const diff = date.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday
|
const diff = date.getDate() - day + (day === 0 ? -6 : 1); // adjust when day is sunday
|
||||||
return new Date(date.setDate(diff));
|
return new Date(date.setDate(diff));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user