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

Feat: if is holiday rule #42

Merged
merged 6 commits into from
Feb 25, 2022
Merged

Feat: if is holiday rule #42

merged 6 commits into from
Feb 25, 2022

Conversation

commenthol
Copy link
Owner

This PR adds a new rule which moves a holiday in case that day already observes a different holiday.

Change to different weekday if date already falls on a holiday

Rule: <rule> if is (<type>)? holiday then (<count>)? (next|previous) <weekday>

Rule: <rule> if is (<type>)? holiday then (<count>)? (next|previous) day (omit <weekdays>)?

Where:

  • <rule> any rule
  • <type> public, bank, school, observance, optional (defaults to public if omitted)
  • <count> 1...31, 1st, 2nd, 3rd
  • <weekday> Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
  • <weekdays> Comma separated list of <weekday>

Examples:

  • Thursday after 04-02 if is observance holiday then next Thursday
  • 03-01 and if Saturday, Sunday then next Monday if is holiday then 2nd next Tuesday since 2022
  • 05-01 if is public holiday then 2nd next day omit Saturday, Sunday

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