From 32a64be86f1ac0e4b839094a9b9b05ef1b56ea3f Mon Sep 17 00:00:00 2001 From: theluyuan <1162963624@qq.com> Date: Mon, 7 Dec 2020 14:09:59 +0800 Subject: [PATCH] date --- src/utils/date.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/date.ts b/src/utils/date.ts index 3f5d997..51fa97b 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -87,14 +87,14 @@ export function getweek(time: string, id: string,zhou?: number){ console.log(now, 11111) if(zhou != undefined){ - now = now.day(now.day() + (zhou * 6)); + now = now.day(now.day() + (zhou * 7)); } const yue = (now.month() + 1 < 10 ? '0' + (now.month() + 1) : (now.month() + 1)); const day = now.date() // 当前天 zhou = now.day(); // 当前周几 const year = now.year() - const startd = now.day(0).date(); - const start = `${year}-${yue}-${startd > 9 ? startd : '0' + startd}` + const startd = now.day(0); + const start = `${startd.year()}-${(startd.month() + 1 < 10 ? '0' + (startd.month() + 1) : (startd.month() + 1))}-${startd.date() > 9 ? startd.date() : '0' + startd.date()}` interface Date{ day: string; list?: Array;