Repository navigation
Conversation
This branch has not been deployed
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.
Problem
Six public holidays in
data/countries/RO.yamlhave noactiverange, so they show up in years before the law that created them. For example,new Holidays('RO').getHolidays(2015)returns Bobotează, Sfântul Ioan Botezătorul, Ziua Unirii, Vinerea Mare and Ziua Copilului, but none of them was a public holiday in Romania in 2015. The fixtures for 2015 to 2023 contain these wrong entries too.Each of these days was added to art. 139 (1) of the Labour Code (Law 53/2003) by a separate law:
11-3001-2406-01orthodox -201-0601-07None of these laws sets its own start date, so each one took effect 3 days after publication (Constitution, art. 78). That gives the first years above:
Fix
Add an
activerange starting on January 1st of the first year to each of the six rules, with a short comment and@sourcelink to the law above each one. Since every law took effect before the first holiday it covers, January 1st of that year gives the same result as the exact date the law took effect, and it is easier to read. python-holidays models the same start years (2012, 2017, 2017, 2018, 2024).No names or other rules are changed.
Tests
npm run yamlnpx mocha test/all.mocha.js --writetests --countries RO: onlyRO-2015.jsontoRO-2023.jsonchange, and only by removing the entries listed above. 2024 to 2029 are unchanged.npm test: 5652 passingTEST_XXL=1 npm test: 9420 passingnpm run lint: clean