Skip to content

fix(RO): add start years for holidays introduced since 2012 - #674

Open
vicuts wants to merge 1 commit into
commenthol:masterfrom
vicuts:fix/ro-holiday-start-years
Open

vicuts wants to merge 1 commit into
commenthol:masterfrom
vicuts:fix/ro-holiday-start-years

Conversation

@vicuts

@vicuts vicuts commented Oct 4, 2026

Copy link
Copy Markdown

Problem

Six public holidays in data/countries/RO.yaml have no active range, 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:

Rule Holiday Law Published First year
11-30 Sfântul Andrei Law 147/2012 MO 509, 24 July 2012 2012
01-24 Ziua Unirii Principatelor Române Law 176/2016 MO 808, 13 October 2016 2017
06-01 Ziua Copilului Law 220/2016 MO 931, 18 November 2016 2017
orthodox -2 Vinerea Mare Law 64/2018 MO 226, 13 March 2018 2018
01-06 Bobotează Law 52/2023 MO 186, 6 March 2023 2024
01-07 Sfântul Ioan Botezătorul Law 52/2023 MO 186, 6 March 2023 2024

None 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:

  • Law 147/2012 took effect in July 2012, before 30 November, so 2012 already counts.
  • Law 64/2018 took effect in March 2018, before Orthodox Good Friday on 6 April 2018, so 2018 counts.
  • Law 52/2023 took effect in March 2023, after 6 and 7 January had passed, so the first time these days were off was January 2024.
  • Laws 176/2016 and 220/2016 took effect in October and November 2016, after 24 January and 1 June, so both start in 2017.

Fix

Add an active range starting on January 1st of the first year to each of the six rules, with a short comment and @source link 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 yaml
  • npx mocha test/all.mocha.js --writetests --countries RO: only RO-2015.json to RO-2023.json change, and only by removing the entries listed above. 2024 to 2029 are unchanged.
  • npm test: 5652 passing
  • TEST_XXL=1 npm test: 9420 passing
  • npm run lint: clean

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant