带有假期的python日历

问题描述:


可能重复:

假日日历,文件格式等。

Python中是否有一个日历库,我可以用它检查假期,计算两个日期的工作日数(计算两个假期之间的假日)?

Is there a calendar library in Python with which I can check for holidays, compute the number of business days from two dates (accounting for holidays in between)?

如果为国家(例如美国,日本等)设置了参数,我会很喜欢它,以便为不同国家/地区计算假日的时间不同。

I'd love it if it is parameterized for the nation (e.g. US, Japan, etc) so that the holidays are counted for different countries differently.

谢谢

以下还有其他一些*问题,其答案可能会有所帮助您正在进行的任务

Here are a couple of other * questions whose answers may help you on your quest:

  • Holiday Calendars, File Formats, et al.
  • Business days in Python