aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers/todaysSolution.ts
blob: 50e75ceb573ca078f67743d1cc1061f9699dffde (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { songs } 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)

export const todaysSolution = songs[index % songs.length];
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage