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
Add Kenyan calendar #484
Add Kenyan calendar #484
Conversation
(12, 31, "New Years Eve"), | ||
) | ||
|
||
def get_fixed_holidays(self, year): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this to dynamically introduce 'Moi Memorial Day' in 2020 and to rename some things based on year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the right way to go!
|
||
return days | ||
|
||
def get_shifted_holidays(self, dates): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these next two methods to shift Sundays to Mondays, but I've excluded the Islamic days from being shifted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent!
Fixed the linting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll just need to make small changes, and I'll be glad to see Kenya added to the library!
(12, 31, "New Years Eve"), | ||
) | ||
|
||
def get_fixed_holidays(self, year): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the right way to go!
|
||
return days | ||
|
||
def get_shifted_holidays(self, dates): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent!
Amended |
**New Calendar** - Added Kenyan calendar, by @KidkArolis (#484) **Minor fixes** - Fixed Lithuania calendar to use the core flags for Assumption and All Saints (#468). - Fixed Malta calendar ; January 1st was already included, no need to add it to the ``FIXED_HOLIDAYS`` property (#469). - Small refactor in Netherlands calendar to use core constants (#470).
The latest workalendar release (8.4.0) now integrates your Kenyan calendar. Happy upgrading! https://pypi.org/project/workalendar/8.4.0/ |
workalendar.registry_tools.iso_register
decorator to register your new calendar using ISO codes (optional).<country>
by@pseudo
(#)".