어제가 아니잖아!!
This commit is contained in:
parent
f889e36ac2
commit
5016cd8cb3
1 changed files with 3 additions and 5 deletions
|
|
@ -26,15 +26,13 @@ if (args.includes("--today")) {
|
|||
console.log("📅 | --today option detected, using today's date");
|
||||
YYMMDD = new Date().toISOString().slice(0, 10).replace(/-/g, "").toString();
|
||||
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
|
||||
const tomorrow = new Date();
|
||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
YYMMDD = tomorrow.toISOString().slice(0, 10).replace(/-/g, "").toString();
|
||||
|
||||
console.log("📅 | date:", YYMMDD);
|
||||
|
||||
console.log(tomorrow.getDate());
|
||||
if (tomorrow.getDate() === 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue