From 6e092c032ddfa8758cac030f97399fe9c42d395b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=95=94=EB=83=A5=20=28imnyang=29?= Date: Mon, 9 Mar 2026 22:10:08 +0900 Subject: [PATCH] Update index.ts --- app/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/index.ts b/app/index.ts index c911d60..2247745 100644 --- a/app/index.ts +++ b/app/index.ts @@ -3,11 +3,10 @@ import { Meal, Timetable } from "./lib/discord"; async function main() { // Tomorrow is 1st of the month - const tomorrow = new Date(); - tomorrow.setDate(tomorrow.getDate() + 1); - const YYMMDD = tomorrow.toISOString().slice(0, 10).replace(/-/g, "").toString(); + const today = new Date(); + const YYMMDD = today.toISOString().slice(0, 10).replace(/-/g, "").toString(); // const YYMMDD = "20250306"; - const weekday = tomorrow.getDay() === 0 ? 6 : tomorrow.getDay() - 1; + const weekday = today.getDay() === 0 ? 6 : tomorrow.getDay() - 1; // const weekday = 2; console.log("📅 | date:", YYMMDD); @@ -45,4 +44,4 @@ async function main() { main().catch((error) => { console.error("Error in main function:", error); process.exit(1); -}); \ No newline at end of file +});