All Projects → LKI → Chinese Calendar

LKI / Chinese Calendar

Licence: mit
判断一天是不是法定节假日/法定工作日(查看节假日安排)

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Chinese Calendar

Wuss Weapp
🐳wuss-weapp 一款高质量,组件齐全,高自定义的微信小程序UI组件库
Stars: ✭ 338 (-23.36%)
Mutual labels:  calendar
Material Calendar View
📅 Material Design Calendar compatible with API 11+
Stars: ✭ 360 (-18.37%)
Mutual labels:  calendar
Calendar
Календарь событий по фронтенду
Stars: ✭ 395 (-10.43%)
Mutual labels:  calendar
Cvcalendar
A custom visual calendar for iOS 8+ written in Swift (>= 4.0).
Stars: ✭ 3,435 (+678.91%)
Mutual labels:  calendar
Business
Ruby business day calculations
Stars: ✭ 352 (-20.18%)
Mutual labels:  calendar
Mpvue Calendar
📅 A calendar component for vue3.0. Support gesture sliding, range selection, according to the week switch...
Stars: ✭ 373 (-15.42%)
Mutual labels:  calendar
Fb2cal
Fetch Facebook Birthdays events and create an ICS file for use with calendar apps
Stars: ✭ 335 (-24.04%)
Mutual labels:  calendar
Chinese Calendar
📅 中国农历(阴历)与阳历(公历)转换与查询工具
Stars: ✭ 428 (-2.95%)
Mutual labels:  calendar
Cadar
Android solution which represents month and list calendar views.
Stars: ✭ 360 (-18.37%)
Mutual labels:  calendar
React Infinite Calendar
✨ Infinite scrolling date-picker built with React, with localization, range selection, themes, keyboard support, and more.
Stars: ✭ 3,828 (+768.03%)
Mutual labels:  calendar
Calendar Base
Base methods for generating calendars using JavaScript.
Stars: ✭ 342 (-22.45%)
Mutual labels:  calendar
Rkcalendar
SwiftUI Simple Calendar / Date Picker for iOS
Stars: ✭ 349 (-20.86%)
Mutual labels:  calendar
Markdeep
Official public Markdeep source archive
Stars: ✭ 373 (-15.42%)
Mutual labels:  calendar
2019 Typography Calendar
2019 字体日历 App
Stars: ✭ 342 (-22.45%)
Mutual labels:  calendar
Agendav
A CalDAV web client similar to Google Calendar
Stars: ✭ 412 (-6.58%)
Mutual labels:  calendar
Ionic2 Calendar
A calendar component based on Ionic framework
Stars: ✭ 338 (-23.36%)
Mutual labels:  calendar
Zebra datepicker
A super-lightweight, highly configurable, cross-browser date / time picker jQuery plugin
Stars: ✭ 367 (-16.78%)
Mutual labels:  calendar
Calendarview
An Easy to Use Calendar for iOS (Swift 5.0)
Stars: ✭ 429 (-2.72%)
Mutual labels:  calendar
Openpaas Esn
Open PaaS Enterprise Social Network
Stars: ✭ 414 (-6.12%)
Mutual labels:  calendar
Repl
The Learning Hub for UoL's Online CS Students
Stars: ✭ 367 (-16.78%)
Mutual labels:  calendar

中国节假日

Package Travis License README

判断某年某月某一天是不是工作日/节假日。 支持 2004年 至 2021年,包括 2020年 的春节延长。

安装

pip install chinesecalendar

样例

import datetime

# 判断 2018年4月30号 是不是节假日
from chinese_calendar import is_workday, is_holiday
april_last = datetime.date(2018, 4, 30)
self.assertFalse(is_workday(april_last))
self.assertTrue(is_holiday(april_last))

# 或者在判断的同时,获取节日名
import chinese_calendar as calendar  # 也可以这样 import
on_holiday, holiday_name = calendar.get_holiday_detail(april_last)
self.assertTrue(on_holiday)
self.assertEqual(calendar.Holiday.labour_day.value, holiday_name)

# 还能判断法定节假日是不是调休
import chinese_calendar
self.assertFalse(chinese_calendar.is_in_lieu(datetime.date(2006, 1, 1)))
self.assertTrue(chinese_calendar.is_in_lieu(datetime.date(2006, 1, 2)))

其它语言

假如你没法使用Python, 你也可以转译现成的常量文件来获取最全的节假日安排表。

贡献代码

  1. Fork + Clone 项目到本地
  2. 修改节假日定义
  3. 执行脚本自动生成常量文件
  4. 提交PR
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].