Skip to content

Conversation

@KJhellico
Copy link
Collaborator

Proposed change

Introduce workdays related calculation support in Python Holidays. Add following public methods to HolidayBase:

  • is_workday(dt) - check if date is a working day
  • get_nth_workday(dt, n) - return n-th working day from date
  • get_workdays_number(dt1, dt2) - return the number of working days between two dates

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/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new python-holidays functionality in general)

Checklist

  • I've followed the contributing guidelines
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

@KJhellico KJhellico requested a review from arkid15r as a code owner April 22, 2024 11:18
@coveralls
Copy link

coveralls commented Apr 22, 2024

Pull Request Test Coverage Report for Build 8883292282

Details

  • 24 of 24 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 8851516970: 0.0%
Covered Lines: 11077
Relevant Lines: 11077

💛 - Coveralls

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.

Great PR, this will make UX more consistent with users' expectations.

Thank you!

arkid15r
arkid15r previously approved these changes Apr 29, 2024
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.

LGTM 👍

Co-authored-by: Arkadii Yakovets <[email protected]>
@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@arkid15r arkid15r changed the title Introduce workdays support Introduce workdays calculation support Apr 29, 2024
@arkid15r arkid15r added this pull request to the merge queue Apr 29, 2024
Merged via the queue into vacanza:dev with commit d6fd3b6 Apr 29, 2024
@KJhellico KJhellico deleted the feat-workdays branch April 29, 2024 18:21
This was referenced May 6, 2024
@KJhellico KJhellico mentioned this pull request Aug 30, 2025
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.

3 participants