date warning change
This commit is contained in:
1 parent
260bbac368
commit
c931762244
1 file changed
+1
-1
@@ -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));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user