Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce start/end year for entity #2141

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

KJhellico
Copy link
Collaborator

Proposed change

Introduce start/end year of period in which entity holidays are defined (with default values 1901 and 2100).

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6a9735d) to head (c4b437f).
Report is 3 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##               dev     #2141    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          194       194            
  Lines        11714     11556   -158     
  Branches      1772      1641   -131     
==========================================
- Hits         11714     11556   -158     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad this is finally getting implemented ❤️

This might be something for later, but having subdivision-level start dates would be nice for countries such as Australia or the United States - or a future #1852 implementation. 👀

holidays/countries/finland.py Show resolved Hide resolved
holidays/countries/thailand.py Show resolved Hide resolved
PPsyrius
PPsyrius previously approved these changes Nov 28, 2024
Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🕚

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one comes a bit unexpected to me. I've started implementing supported ranges for v1 and covered countries starting from A-H so far. It'll be interesting to compare both implementations and especially start/end dates. I introduced a class decorators for better readability and made the dates more precise -- the actual dates instead of just years with a detailed comment why this date was picked as the range start/end.

Great stuff @KJhellico , a lot of work behind this PR 👍

@arkid15r arkid15r added this pull request to the merge queue Dec 2, 2024
Merged via the queue into vacanza:dev with commit 15d71ba Dec 2, 2024
28 checks passed
@KJhellico KJhellico deleted the add-years-interval branch December 2, 2024 18:38
@arkid15r arkid15r mentioned this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants