-
Notifications
You must be signed in to change notification settings - Fork 481
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
US business days - configurable options #2
Comments
I have not heard of there being an Easter bank holiday before. Admittedly I am not as familiar with US holidays as Canadian, but I've written a lot of software that deals with processing ACH transactions in the US system where holidays have to be taken into account and I've never seen transactions delayed due to Easter. The Federal Reserve does not consider it a holiday[1]. I'd definitely be open to adding some additional options for the US if there were some clear standards that appeared to be agreed on, but that doesn't seem to be the case? For special cases like Christmas Eve and New Year's Eve, which only some industries/companies observe, it is quite easy to create your own custom holiday class by inheriting from one of the existing classes. Example: >>> from datetime import date
>>> import holidays
>>>
>>> class NYSEHolidays(holidays.US):
>>> def _populate(self, year):
>>> # Add standard holidays from holidays.US class
>>> holidays.US._populate(self, year)
>>> # Add custom holiday
>>> self[date(year, 12, 24)] = "Christmas Eve"
>>>
>>> print '2014-12-24' in NYSEHolidays()
True |
Fix Queen's birthday in AU/Queensland closes #90
Fix Queen's birthday in AU/Queensland closes vacanza#90
I have reviewed/tested the code to check what exactly it does with US.
My assumption is that the main use for the module is to identify business vs. non-business days. Seems like there might some discrepancies / options at least within US.
The current list seems to reflect US Post Office schedule, though most businesses are likely to follow Bank Holiday schedule (no business if bank is closed - main difference banks closed on Easter).
Moreover, there are some special cases (e.g. "long weekends" with extra Friday on Thanksgiving, etc, early business closing on "pre-holiday" days, like xmas/new year and possibly others).
I wonder if it might be valuable to make things like this configurable beyond the basic USPS schedule?
References -
http://www.theholidayschedule.com/post-office-holidays.php
http://www.theholidayschedule.com/bank-holidays.php
http://www.theholidayschedule.com/nyse-holidays.php
The text was updated successfully, but these errors were encountered: