G20国家假期文件

发布于 2024-07-25 18:19:51 字数 1542 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

放手` 2024-08-01 18:19:51

编辑:
更新了 novapost 的 github 存储库中的链接。

我最近遇到了 https://github.com/peopledoc/workalendar
我在法国用它,它就像一个魅力。

"""
>>> from datetime import date
>>> from workalendar.europe import France
>>> cal = France()
>>> cal.holidays(2013)
[(datetime.date(2013, 1, 1), 'New year'),
 (datetime.date(2013, 4, 1), 'Easter Monday'),
 (datetime.date(2013, 5, 1), 'Labour Day'),
 (datetime.date(2013, 5, 8), 'Victory in Europe Day'),
 (datetime.date(2013, 5, 9), 'Ascension Thursday'),
 (datetime.date(2013, 5, 20), 'Whit Monday'),
 (datetime.date(2013, 5, 30), 'Corpus Christi'),
 (datetime.date(2013, 7, 14), 'Bastille Day'),
 (datetime.date(2013, 8, 15), 'Assumption of Mary to Heaven'),
 (datetime.date(2013, 11, 1), 'All Saints Day'),
 (datetime.date(2013, 11, 11), 'Armistice Day'),
 (datetime.date(2013, 12, 25), 'Christmas Day')]
>>> cal.is_working_day(date(2013, 12, 25))  # it's Christmas
False
>>> cal.is_working_day(date(2013, 12, 29))  # it's Sunday
False
>>> cal.is_working_day(date(2013, 12, 26))
True

Edit:
Updated the link from from novapost's github repo.

I recently came across https://github.com/peopledoc/workalendar.
I use it for France and it works like a charm.

"""
>>> from datetime import date
>>> from workalendar.europe import France
>>> cal = France()
>>> cal.holidays(2013)
[(datetime.date(2013, 1, 1), 'New year'),
 (datetime.date(2013, 4, 1), 'Easter Monday'),
 (datetime.date(2013, 5, 1), 'Labour Day'),
 (datetime.date(2013, 5, 8), 'Victory in Europe Day'),
 (datetime.date(2013, 5, 9), 'Ascension Thursday'),
 (datetime.date(2013, 5, 20), 'Whit Monday'),
 (datetime.date(2013, 5, 30), 'Corpus Christi'),
 (datetime.date(2013, 7, 14), 'Bastille Day'),
 (datetime.date(2013, 8, 15), 'Assumption of Mary to Heaven'),
 (datetime.date(2013, 11, 1), 'All Saints Day'),
 (datetime.date(2013, 11, 11), 'Armistice Day'),
 (datetime.date(2013, 12, 25), 'Christmas Day')]
>>> cal.is_working_day(date(2013, 12, 25))  # it's Christmas
False
>>> cal.is_working_day(date(2013, 12, 29))  # it's Sunday
False
>>> cal.is_working_day(date(2013, 12, 26))
True
情深如许 2024-08-01 18:19:51

www.bank-holidays.com 似乎更便宜。

但是,如果您查看英格兰银行的公共假期,您会看到以下内容 (http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_073741)

特殊银行假日

法律允许更改银行假日日期或宣布其他假日,例如庆祝特殊场合。

最近的特殊银行假期的例子是 1981 年的皇家婚礼、1999 年的千禧年假期和 2002 年的女王登基五十周年。

所以。 无法预测未来十年的假期。 一种可能性是估算给定时期内的假期数量。

www.bank-holidays.com seems cheaper.

However, if you look at the public holiday for banks in England, you see the following (http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_073741)

Special bank holidays

There are laws that allow the dates of bank holidays to be changed, or other holidays to be declared, for example to celebrate special occasions.

The most recent examples of special bank holidays were for the Royal Wedding in 1981, the Millennium holiday in 1999 and the Queen’s Golden Jubilee in 2002.

So. It is not possible to predict holiday in the next ten year. One possibility would be to approximate the number of holiday in a given period.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文