Comments (3)
图片转json
holidays
2024:
{
'Spring Festival': [(2, 10), (2, 11), (2, 12), (2, 13), (2, 14), (2, 15), (2, 16), (2, 17)],
'Ching Ming Festival':[(4,4),(4,5),(4,6)],
'Labour Day Holiday': [(5, 1), (5, 2), (5, 3), (5,4), (5, 5)],
'Dragon Boat Festival': [(6,8),(6, 9),(6,10)],
'Mid-Autumn Festival': [(9,15),(9,16),(9,17)],
'National Day': [(10, 1), (10, 2), (10, 3), (10, 4), (10, 5), (10, 6), (10, 7)],
'New year': [(1,1)]
}
workdays
2024:{
'Spring Festival Shift': [(2, 4), (2,18)],
'Ching Ming Festival Shift': [(4,7)],
'Labour Day Holiday Shift': [(4,28), (5,11)],
'Dragon Boat Festival Shift':[],
'Mid-Autumn Festival Shift':[(9,14)],
'National Day Shift': [(9,29),(10,12)],
'New year Shift': []
}
from workalendar.
可以自己临时改一下"china.py"文件,但我没清楚了解它的逻辑;它的春节与国庆似乎是通过函数计算获取的,所以"hoildays"中定义并没有春节与国庆;而其它的节假日则需要自定义;
另外,它的"hoildays"定义似乎除了定义该日期是否为节假日外,还用于确定该日期是否为工作日,这容易引发一个问题,就是假如节日的日期是通过"holidays"来定义的话,返回的节日实际信息可能有误;
如果你用这个项目只是用于区分"该日期是否为工作日",可以尝试这样定义,注意,我只是猜测这样能"正确区分工作日",仅供参考,实际以官方更新为准:
from workalendar.
可以自己临时改一下"china.py"文件,但我没清楚了解它的逻辑;它的春节与国庆似乎是通过函数计算获取的,所以"hoildays"中定义并没有春节与国庆;而其它的节假日则需要自定义;
另外,它的"hoildays"定义似乎除了定义该日期是否为节假日外,还用于确定该日期是否为工作日,这容易引发一个问题,就是假如节日的日期是通过"holidays"来定义的话,返回的节日实际信息可能有误;
如果你用这个项目只是用于区分"该日期是否为工作日",可以尝试这样定义,注意,我只是猜测这样能"正确区分工作日",仅供参考,实际以官方更新为准:
问题出在以前的年三十是放假的,所以大陆的配置里开启了默认生成年三十,这里需要改开关项,然后把历史数据里的年份手动补配置成假期,ref的pr没处理这个问题,所以ut case看起来比较奇怪
from workalendar.
Related Issues (20)
- missing one day of Seollal for year 2023
- lost day in get_working_days_delta when start==end
- New Release Required HOT 2
- International Women's Day in MV/Germany (Mecklenburg-Vorpommern)
- Coronation of King Charles III not included in UK bank holidays HOT 1
- Holiday error in South Korea HOT 3
- Lazily import region modules as required
- CzechRepublic: 2023-07-01 .. 2023-08-01 reports 20 working days while there are 19
- Some Japanese national holidays are missing
- Add Matariki to NZ Calendar
- Include declared one-time holidays
- Victory over Japan Day
- Danish public holiday "Store Bededag" no longer observed as of 2024
- Workalendar 17.0.0 cal = Ireland Returning Incorrect Date & Holiday Name
- The 2024 Chinese calendar is not updated yet. HOT 2
- Ireland missing St Brigid's Day
- Vietnam Calendar?
- datetime64[ns] is of unsupported type
- Days in lieu when holiday falls on weekend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workalendar.