Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tiansh/gzr
我在写 iOS 的快捷指令(shortcuts)的时候需要有个方法来判断是不是工作日…… // Is some day workday in China? Use stupid HTTP query for checking Chinese workdays / weekends.
https://github.com/tiansh/gzr
china holiday weekend workday
Last synced: about 1 month ago
JSON representation
我在写 iOS 的快捷指令(shortcuts)的时候需要有个方法来判断是不是工作日…… // Is some day workday in China? Use stupid HTTP query for checking Chinese workdays / weekends.
- Host: GitHub
- URL: https://github.com/tiansh/gzr
- Owner: tiansh
- Created: 2019-09-26T02:15:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-12T15:33:12.000Z (about 2 months ago)
- Last Synced: 2024-11-12T16:35:36.015Z (about 2 months ago)
- Topics: china, holiday, weekend, workday
- Homepage:
- Size: 12.7 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
我在写 iOS 的快捷指令(shortcuts)的时候需要有个方法来判断是不是工作日……所以解决办法就成了这样了。
具体使用的时候:
1. 先格式化日期,日期格式自定,格式化字串
'https://tiansh.github.io/gzr/'yyyy/M/d'.json'
2. 然后获取“格式化后的日期”内容
3. 最后匹配“URL的内容”中的“true”节假日仅包含全国性节假日,不包含地区节假日。
----
Workdays in P.R.China; query `'https://tiansh.github.io/gzr/'yyyy/M/d'.json'`, response json will be `{"isWorkday":false}` or `{"isWorkday":true}`. Support year 2019-2025. Only national holidays are inclcuded.