From 4c4c55f7456ce00f0650a8e93e6f68488bb05ba1 Mon Sep 17 00:00:00 2001 From: Tomachi <8929706+book000@users.noreply.github.com> Date: Wed, 3 Jan 2024 16:50:42 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=8A=E5=B9=B4=E3=81=AE=E7=B5=8C?= =?UTF-8?q?=E9=81=8E=E6=97=A5=E6=95=B0=E8=A8=88=E7=AE=97=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20(#308)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jobs/everyday.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/jobs/everyday.ts b/src/jobs/everyday.ts index dc4c2cd5..26facab3 100644 --- a/src/jobs/everyday.ts +++ b/src/jobs/everyday.ts @@ -41,10 +41,11 @@ export class EveryDayJob extends BaseDiscordJob { // 年間通算日数 const yearStart = new Date(today.getFullYear(), 0, 1) const yearEnd = new Date(today.getFullYear(), 11, 31) - // 今年の経過日数 - const yearPassed = Math.floor( - (today.getTime() - yearStart.getTime()) / (1000 * 60 * 60 * 24) - ) + // 今年の経過日数 (当日を含むため、+1) + const yearPassed = + Math.floor( + (today.getTime() - yearStart.getTime()) / (1000 * 60 * 60 * 24) + ) + 1 // 年日数 const yearTotal = Math.floor( (yearEnd.getTime() - yearStart.getTime()) / (1000 * 60 * 60 * 24)