fix(docs): should count any range between Jan & Dec
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user