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

Inclusive RelativeToFixed holiday #164

Open
ben-manes opened this issue Jul 5, 2022 · 1 comment
Open

Inclusive RelativeToFixed holiday #164

ben-manes opened this issue Jul 5, 2022 · 1 comment

Comments

@ben-manes
Copy link

I have the following configuration,

<tns:RelativeToFixed validFrom="1776" descriptionPropertiesKey="INDEPENDENCE">
  <tns:Date month="JULY" day="4"/>
  <tns:When>CLOSEST</tns:When>
  <tns:Weekday>MONDAY</tns:Weekday>
</tns:RelativeToFixed>

In 2021 the 4th was a Sunday so I expected the 5th to be a holiday. This worked as expected.
In 2022 the 4th was a Monday so I expected the 4th to be a holiday. Instead, it said the 11th is.

The RelativeToFixedParser has the comment don't test start day. Can this be an option or how should I have configured this?

@ben-manes
Copy link
Author

ben-manes commented Jul 5, 2022

It seems my rule might need to follow this description (from Google'ing)

If the Fourth of July falls on a Sunday, the federal observed holiday is the following Monday, July 5. If the Fourth of July falls on a Saturday, the observed holiday for most (but not all) federal employees is Friday, July 3.

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

No branches or pull requests

1 participant