From 53939633d070ff498fbb9ae2f26a0be0317efee6 Mon Sep 17 00:00:00 2001 From: Brendan F Date: Sun, 25 Jun 2023 22:22:37 -0700 Subject: Move startDate to one defined spot --- src/helpers/todaysSolution.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/helpers/todaysSolution.ts') diff --git a/src/helpers/todaysSolution.ts b/src/helpers/todaysSolution.ts index 50e75ce..32760cb 100644 --- a/src/helpers/todaysSolution.ts +++ b/src/helpers/todaysSolution.ts @@ -1,11 +1,10 @@ -import { songs } from "../constants"; +import { songs, startDate } from "../constants"; // const epochMs = new Date(2022, 3, 10).valueOf(); // const now = Date.now(); // const index = Math.floor((now - epochMs) / msInDay); const msInDay = 86400000; -const startDate = new Date('4/15/2022'); const todaysDate = new Date(); const index = Math.floor((todaysDate.getTime() - startDate.getTime() )/msInDay) -- cgit v1.2.3