fix(docs): should count any range between Jan & Dec

This commit is contained in:
Neko Ayaka
2026-01-04 23:09:33 +08:00
parent fdb1953d8e
commit 64eb668248
+1 -1
View File
@@ -11,7 +11,7 @@ export function isBetweenHalloweenAndHalfOfNovember(date: Date) {
export function isBetweenChristmasAndHalfOfJanuary(date: Date) {
const year = date.getFullYear()
const christmas = new Date(year, 11, 20) // December 20
const halfOfJanuary = new Date(year + 1, 0, 10) // January 10 of the next year
const halfOfJanuary = new Date(year, 0, 10) // January 10 of the next year
return isAfter(date, christmas) && isBefore(date, halfOfJanuary)
}