jaraco / calendra Goto Github PK
View Code? Open in Web Editor NEWThis project forked from workalendar/workalendar
Worldwide holidays and workdays computational toolkit.
License: MIT License
This project forked from workalendar/workalendar
Worldwide holidays and workdays computational toolkit.
License: MIT License
@ShaheedHaque, I've invited you as a collaborator on this project. With the integrated CI, and with the changelog up-to-date, all that's needed to cut a release is to tag it (i.e. git tag -a -m "" v7.0.0
). Would you care to do the honors?
Although you don't need access to PyPI in order to cut releases, I'd also like to grant you maintainer access there as well in case a manual release is needed and to reduce the bus factor on the project. Just let me know your userid there.
When calendra is a zip package, calendra.__package__
resolves to None on Python 3.4 (and probably earlier Pythons), causing the package to be entirely broken, as any import of calendra fails with:
/.eggs/calendra-1.7-py3.4.egg/calendra/__init__.py:6: in <module>
???
/usr/local/lib/python3.4/dist-packages/pkg_resources/__init__.py:553: in get_distribution
raise TypeError("Expected string, Requirement, or Distribution", dist)
E TypeError: ('Expected string, Requirement, or Distribution', None)
I'm using calendra 1.1.3 on Python 2.7.8. I'm using the Finnish holiday calendar and have noticed a problem with it.
When using the Finnish calendar, fixed holidays that occur on a weekend are moved to the next working day. Example, the Finnish Independence Day that is the 6th of December:
In [3]: holiday_calendar.is_observed_holiday(date(2014, 12, 8))
Out[3]: True
In [4]: holiday_calendar.is_observed_holiday(date(2014, 12, 6))
Out[4]: False
In [7]: holiday_calendar.get_observed_date(date(2014, 12, 6))
Out[7]: datetime.date(2014, 12, 8)
This also happens with the Labour Day (1st of May). But in Finland the day off is not transferred to the next monday if the day occurs on the weekend. I can't find a source on it though, but you can check other calendars such as http://www.timeanddate.com/holidays/finland/.
This issue can be fixed by setting an observance_shift = dict()
for the Finnish calendar, though I arrived at the value of dict()
just by random testing (I don't know the format) and I don't know if it has any adverse effects.
The UK early May bank holiday for 2020 is changing from the expected date to 8-May:
I'd like to request this be added to Calendra please.
P.S. I've reviewed the contributing guidelines, and with a bit of advice to prevent breakage to what I guess is a high-usage calendar, I might be able to cook up a patch in due course if needed.
Is there a plan to release something synced to up[stream v16.1.0 (2021-10-01)? I am specifically interested in the UK holiday changes please...
Project has an implicit dependency on setuptools by using pkg_resources. Let's switch to importlib_metadata instead.
Not every country follows the "floating monday" mechanism for holydays. For what I was able to figure out this is mainly used in the USA but not in Europe (certainly not in Italy).
Line 495 in 40ec079
The default observance_shift
should be left None
or empty dict and should be set only to single calendars.
Hello, I'm writing to request the addition of the calendra support for Bosnia and Herzegovina.
We just noticed that the UK Boxing Day should be 2020-12-28, not 2020-12-26. I believe this is fixed in upstream, so a resync is likely in order.
On Python 3.8, many of the tests fail with the error 'int' object has no attribute 'year'
when adding a Holiday object to a timedelta.
Calendra last synced with Workalendar at version 8, so is due for a refresh.
In 2015, Independence Day occurs on a Saturday, so is observed on the previous Friday, but Calendra currently shows it observed on Monday, July 6.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.