Skip to content

Commit

Permalink
fix: used wrong date format for updating date
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Dec 3, 2022
1 parent 336159f commit 519019c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/selectDayView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export class SelectDayView {

function generateTree(): Tree[] {
const date: Date = new Date();
date.setDate(date.getUTCDate() - (date.getUTCHours() < 5 ? 1 : 0)); // if not yet 5 o'clock use last day, else use current day
date.setUTCDate(date.getUTCDate() - (date.getUTCHours() < 5 ? 1 : 0)); // if not yet 5 o'clock use last day, else use current day
const year: number = date.getUTCFullYear();
const month: number = date.getUTCMonth();
const day: number = date.getUTCDate();

const startYear: number = 2015;
const isDecember: boolean = month === 11; /// Month zero-indexed???
const isDecember: boolean = month === 11; // Month is zero-based
const puzzleDays: number = 25;

const yearCount: number = year - startYear;
Expand Down

0 comments on commit 519019c

Please sign in to comment.