Skip to content

Commit

Permalink
Added words and fixed date parsing for 2023-11-1 == 2023-1-11
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncabot committed Nov 4, 2023
1 parent 1be0428 commit 72c849e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion functions/_middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ class MetaUpdater {

const boardAndSolutionsForToday: () => { words: Set<string>, letters: string[] } = () => {
const today = new Date();
const paddedDayString = today.getDate().toString().padStart(2, '0');
const paddedMonthString = (today.getMonth() + 1).toString().padStart(2, '0');
const id = today.getFullYear() + paddedMonthString + paddedDayString;
const config = {
size: { width: 4, height: 4 },
id: parseInt([today.getFullYear(), today.getMonth() + 1, today.getDate()].join(''), 10),
id: parseInt(id),
dictionary: "small.json",
frequencies: 'letters.json'
};
Expand Down
Loading

0 comments on commit 72c849e

Please sign in to comment.