Repository navigation
fix(TZ,ZW,AI,BS): four holidays that fall on the wrong day - #735
Merged
commenthol merged 4 commits intoNov 29, 2026
Merged
Conversation
The schedule of the Public Holidays Act (Cap. 35 R.E. 2023) lists "Revolution Day-12th January" and "Boxing Day-26th December". The data had Zanzibar Revolution Day on January 2, and December 26 used the Christmas Day name.
When August 1 is a Tuesday, the 2nd Tuesday in August comes before Heroes' Day (2nd Monday). General Notice 244 of 2016 lists Heroes' Day on Monday 14 August 2017 and Defence Forces National Day on Tuesday 15 August 2017. Changes 2017, 2023 and 2028.
The Government of Anguilla lists both after August Monday (the first Monday in August), e.g. 7, 10 and 11 August 2017 and 4, 7 and 8 August 2025. The 1st Thursday in August comes before August Monday when August 1 is a Tuesday, Wednesday or Thursday, and the 1st Friday does when August 1 is a Tuesday to Friday.
National Heroes' Day replaced Discovery Day (October 12) in October 2013 and is held on the second Monday in October: the Bahamas High Commission in London listed it on Monday 8 October 2018, and the BISX trading calendar on Monday 11 October 2021. Discovery Day keeps the October 12 rule before 2013.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four rules put a holiday on the wrong day. I found them by comparing the public holidays of every country that both date-holidays and python-holidays cover for 2015–2027, then checked each one against official sources.
TZ – Zanzibar Revolution Day and Boxing Day
01-02→01-12. The schedule of the Public Holidays Act (Cap. 35 R.E. 2023) lists "Revolution Day-12th January", the anniversary of the 1964 revolution. The same schedule lists "Boxing Day-26th December", but12-26used the12-25name, so December 26 showed up as a second "Christmas Day". It now uses the12-26name.ZW – Defence Forces Day
2nd tuesday in August→tuesday after 2nd monday in August. When August 1 is a Tuesday, the 2nd Tuesday comes before Heroes' Day (the 2nd Monday). General Notice 244 of 2016 lists Heroes' Day on Monday 14 August 2017 and Defence Forces National Day on Tuesday 15 August 2017. The data had 8 August. This changes 2017, 2023 and 2028.AI – August Thursday and Constitution Day
1st thursday in August→thursday after 1st monday in August, and1st friday in August→friday after 1st monday in August. The Government of Anguilla's holiday lists put both days after August Monday:This changes every year in which August 1 falls on a Tuesday to Friday.
BS – National Heroes' Day
National Heroes' Day replaced Discovery Day (October 12) in October 2013, first on Monday 14 October 2013. It is held on the second Monday in October. The Bahamas High Commission in London listed it on Monday 8 October 2018, where the data had Friday 12 October, and the BISX 2021 trading calendar closes on Monday 11 October 2021, where the data had Tuesday 12 October. The rule is now
2nd monday in October since 2013. The October 12 rule applies only before 2013, under the name Discovery Day, so 2013 now has a single entry on October 14.I also added these sources as
@sourcelines in the four files.Tests
Regenerated the TZ, ZW, AI and BS 2015–2029 fixtures with
mocha test/all.mocha.js --writetests -c TZ,ZW,AI,BS. WithTEST_XXL=1andTZ=UTC, as in CI, the new fixtures fail with the old data (60 failing) and pass with the new data (60 passing). The full mocha run gives 9420 passing and 90 failing, and all 90 failures are CK-* fixtures. Their file names differ only in case, so they clash on my macOS checkout, and master fails the same 90.npx eslintandcommitlintare clean.