Update index.ts
This commit is contained in:
parent
3c1ca77c9e
commit
6e092c032d
1 changed files with 4 additions and 5 deletions
|
|
@ -3,11 +3,10 @@ import { Meal, Timetable } from "./lib/discord";
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
// Tomorrow is 1st of the month
|
// Tomorrow is 1st of the month
|
||||||
const tomorrow = new Date();
|
const today = new Date();
|
||||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
const YYMMDD = today.toISOString().slice(0, 10).replace(/-/g, "").toString();
|
||||||
const YYMMDD = tomorrow.toISOString().slice(0, 10).replace(/-/g, "").toString();
|
|
||||||
// const YYMMDD = "20250306";
|
// const YYMMDD = "20250306";
|
||||||
const weekday = tomorrow.getDay() === 0 ? 6 : tomorrow.getDay() - 1;
|
const weekday = today.getDay() === 0 ? 6 : tomorrow.getDay() - 1;
|
||||||
// const weekday = 2;
|
// const weekday = 2;
|
||||||
|
|
||||||
console.log("📅 | date:", YYMMDD);
|
console.log("📅 | date:", YYMMDD);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue