Open AndrewLane opened 6 years ago
same issue
FYI I added a test that demonstrates the bug here: https://github.com/kodie/moment-holiday/pull/34
I hope it's helpful.
I have the same issue
date: '11/(5,[23])'
does the job. I added a custom day after thanksgiving with that date, but I can make a PR with the change.
@smarth55 actually at this point i'm wondering if we should consider this a dead project since I haven't seen commits since 2017.
The day of reckoning is upon us!!!
Hopefully no one has important client facing code relying on this! Our little slack bot tool didn't give us our notifications this morning because of this bug, but that doesn't REALLY matter. Good luck all moment-holiday users!
Looks like the library assumes that the Day After Thanksgiving is the 4th Friday of November based on this code:
https://github.com/kodie/moment-holiday/blob/447e7ff467ec18d7af89ed2de6b4c98924cc3319/locale/united_states.js#L73
However, on years like 2019 when the first day of the month of November is Friday, this means that the code will actually calculate the day after Thanksgiving as being before Thanksgiving itself. To repro:
Expected:
Actual: