어제가 아니잖아!!

This commit is contained in:
imnyang 2025-05-09 22:59:00 +09:00
commit 5016cd8cb3

View file

@ -26,15 +26,13 @@ if (args.includes("--today")) {
console.log("📅 | --today option detected, using today's date"); console.log("📅 | --today option detected, using today's date");
YYMMDD = new Date().toISOString().slice(0, 10).replace(/-/g, "").toString(); YYMMDD = new Date().toISOString().slice(0, 10).replace(/-/g, "").toString();
console.log("📅 | Using today's date:", YYMMDD); console.log("📅 | Using today's date:", YYMMDD);
} else {
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
YYMMDD = yesterday.toISOString().slice(0, 10).replace(/-/g, "").toString();
console.log("📅 | Using yesterday's date:", YYMMDD);
} }
// Tomorrow is 1st of the month // Tomorrow is 1st of the month
const tomorrow = new Date(); const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1); tomorrow.setDate(tomorrow.getDate() + 1);
YYMMDD = tomorrow.toISOString().slice(0, 10).replace(/-/g, "").toString();
console.log("📅 | date:", YYMMDD);
console.log(tomorrow.getDate()); console.log(tomorrow.getDate());
if (tomorrow.getDate() === 1) { if (tomorrow.getDate() === 1) {