Skip to content

Commit 227dd70

Browse files
Merge pull request #1997 from markscott-ms/aoc-fix-2026
fix(aoc): unlock days based on December 2025
2 parents 348f706 + 0783ad1 commit 227dd70

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

advent-of-calm/website/src/components/Calendar.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ const days = Array.from({ length: 24 }, (_, i) => ({
111111
// Client-side unlock based on user's local date
112112
function isUnlocked(day: number): boolean {
113113
const now = new Date();
114-
const currentYear = now.getFullYear();
115-
const unlockDate = new Date(currentYear, 11, day); // Month 11 = December
114+
const unlockDate = new Date(2025, 11, day); // Month 11 = December
116115
return now >= unlockDate;
117116
}
118117

advent-of-calm/website/src/pages/day/[day].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ const nextDay = dayNum < 24 ? dayNum + 1 : null;
289289
// Client-side unlock for next day navigation based on user's local date
290290
function isUnlocked(day: number): boolean {
291291
const now = new Date();
292-
const currentYear = now.getFullYear();
293-
const unlockDate = new Date(currentYear, 11, day); // Month 11 = December
292+
293+
const unlockDate = new Date(2025, 11, day); // Month 11 = December
294294
return now >= unlockDate;
295295
}
296296

advent-of-calm/website/src/utils/calendar.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ export function getDayTitle(day: number): string {
3636

3737
export function isUnlocked(day: number): boolean {
3838
const now = new Date();
39-
const currentYear = now.getFullYear();
40-
const unlockDate = new Date(currentYear, 11, day); // Month 11 = December
41-
39+
const unlockDate = new Date(2025, 11, day); // Month 11 = December
40+
4241
return now >= unlockDate;
4342
}
4443

0 commit comments

Comments
 (0)