From ac3fa4eca67b7d87340db8eb1ba7e39dcdb6a29f Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 28 Jan 2022 11:01:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A5=E6=9C=9F=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=97=B6=E9=97=B4=E5=AD=A3=E5=BA=A6=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/widget/serviceImpl/TimeDateRangeServiceImpl.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js b/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js index f69e9d36db..c078919a9e 100644 --- a/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js @@ -125,7 +125,8 @@ class TimeDateRangeServiceImpl extends WidgetService { getEndQuarter() { var now = new Date() var nowMonth = now.getMonth() - const endMonth = Math.floor((nowMonth / 3)) * 3 + (nowMonth % 3) + const quar = Math.floor(nowMonth / 3) + const endMonth = quar * 3 + 2 const days = (endMonth === 5 || endMonth === 8) ? 30 : 31 return new Date(now.getFullYear(), endMonth, days) }