date warning change

This commit is contained in:
unknown 2020-07-22 23:56:29 +03:00
parent 260bbac368
commit c931762244

View File

@ -125,7 +125,7 @@ export const getLocaleMonth = (date: Date, locale: string) => {
*/
const getMonday = (date: Date) => {
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));
};