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

RelativeToEasterSunday every not working #14

Closed
pakmans opened this issue May 26, 2015 · 5 comments
Closed

RelativeToEasterSunday every not working #14

pakmans opened this issue May 26, 2015 · 5 comments
Assignees

Comments

@pakmans
Copy link

pakmans commented May 26, 2015

I'm trying to define the thursday before easter sunday to be a holiday like this:

<tns:RelativeToEasterSunday every="EVERY_YEAR" localizedType="UNOFFICIAL_HOLIDAY" >
    <tns:chronology>JULIAN</tns:chronology>
    <tns:days>3</tns:days>
</tns:RelativeToEasterSunday>

With no luck. I have played with the values of the attributes without success.
What am I missing?

@svendiedrichsen
Copy link
Owner

Unfortunately I don't see anything wrong. Besides maybe the missing property 'descriptionPropertiesKey' which is used when the clear name is to be read from the properties file. By the way:

The days should be -3 if you want it to be the day 3 days before easter sunday.

The JAXB/XSD is somewhat picky about the order in which the holidays appear within the configuration. Could you post the whole holiday configuration? I can check it if you like.

Cheers,
Sven

@svendiedrichsen svendiedrichsen self-assigned this May 26, 2015
@pakmans
Copy link
Author

pakmans commented May 26, 2015

Thank you for your quick response.
I tried you suggestion with same results.
I created a simple test case: https://github.com/pakmans/jollydate-issue-example
in case you have time to check it out.
I'm using version 0.4.9, by the way.

@svendiedrichsen
Copy link
Owner

You are using the JULIAN chronology. Which means that you are actually referring to the 12th of april in 2015 as the easter sunday. When you subtract 3 days (by using -3) you end up with the 9th of april.

You should use GREGORIAN as your chronology. Then the test works fine.

<tns:RelativeToEasterSunday every="EVERY_YEAR" localizedType="UNOFFICIAL_HOLIDAY" descriptionPropertiesKey="GOOD_THURSDAY" >
    <tns:chronology>GREGORIAN</tns:chronology>
    <tns:days>-3</tns:days>
</tns:RelativeToEasterSunday>

@pakmans
Copy link
Author

pakmans commented May 26, 2015

I had tried JULIAN and GREGORIAN, but I was using 3 instead of -3!
It is working now, thank you for your generous help.

@svendiedrichsen
Copy link
Owner

anytime, you are welcome. you might want to star the project. ;)

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

2 participants