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

New Zealand calendar missing Matariki holiday #1564

Merged
merged 2 commits into from
Jan 17, 2023

Conversation

jakeheke75
Copy link
Contributor

Updated the header file with Doxygen tags and with the link to the NZ government website. Updated the implementation with the Matariki dates. Instead of blindly adding 31 dates I tried to optimize the code as much as possible. Since I am a newbie I am not sure if the coding logic can be optimized further. Thanks in advance for your comments/review.
Matariki_NZ.ods

Updated the header file with Doxygen tags and with the link to the NZ government website
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 15, 2023

Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.

@CLAassistant
Copy link

CLAassistant commented Jan 15, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Owner

@lballabio lballabio left a comment

Choose a reason for hiding this comment

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

Thanks! It needs a couple of fixes to compile (see comments) but it looks ok.

@@ -62,6 +62,26 @@ namespace QuantLib {
// Boxing Day, December 26th (possibly Monday or Tuesday)
|| ((d == 26 || (d == 28 && (w == Monday || w == Tuesday)))
&& m == December))
Copy link
Owner

Choose a reason for hiding this comment

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

you need to remove the last ) here...

|| (d == 14 && m == July && (y == 2023 || y == 2028))
|| (d == 15 && m == July && (y == 2039 || y == 2050))
|| (d == 18 && m == July && y == 2036)
|| (d == 19 && m == July && (y == 2041 || y == 2047))
Copy link
Owner

Choose a reason for hiding this comment

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

...and add it here at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Arrgh... Thanks Luigi and sorry for the loss of time! Ok noted: before pushing any PR to master (even those that look very simple) I have to code it and be sure that it compiles successfully in my branch locally. Only after local branch build and test is successful, then I will push it to the main branch.

Copy link
Owner

Choose a reason for hiding this comment

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

No problem 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Luigi! This time after coding I built the branch and it was ok. Tested the behaviour of all the 31 dates and it looks good. I attach the test file. Have a nice evening.
NZMatariki.cpp.txt

@coveralls
Copy link

Coverage Status

Coverage: 71.685% (-0.02%) from 71.701% when pulling dc743e3 on jakeheke75:nz-calendar-matariki-holiday into 0305de0 on lballabio:master.

@lballabio lballabio added this to the Release 1.30 milestone Jan 17, 2023
@lballabio lballabio merged commit 93f7dba into lballabio:master Jan 17, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 17, 2023

Congratulations on your first merged pull request!

@jakeheke75 jakeheke75 deleted the nz-calendar-matariki-holiday branch January 17, 2023 17:25
@lballabio lballabio changed the title New Zealand calendar missing Matariki holiday #1562 New Zealand calendar missing Matariki holiday Jan 23, 2023
@lballabio lballabio linked an issue Jan 23, 2023 that may be closed by this pull request
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.

New Zealand calendar missing Matariki holiday
4 participants