{"id":13461670,"url":"https://github.com/LKI/chinese-calendar","last_synced_at":"2025-03-24T22:34:48.290Z","repository":{"id":37677867,"uuid":"93300865","full_name":"LKI/chinese-calendar","owner":"LKI","description":"判断一天是不是法定节假日/法定工作日（查看节假日安排）","archived":false,"fork":false,"pushed_at":"2024-11-13T05:42:15.000Z","size":214,"stargazers_count":1161,"open_issues_count":27,"forks_count":193,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-03-20T08:41:35.179Z","etag":null,"topics":["calendar","chinese-calendar","chinese-holiday","holidays","public-holidays","python","workdays"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/chinesecalendar/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LKI.png","metadata":{"files":{"readme":"README.en.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-04T08:41:18.000Z","updated_at":"2025-03-19T04:38:01.000Z","dependencies_parsed_at":"2024-10-15T08:41:11.790Z","dependency_job_id":"fc8bb890-10da-4fd3-a88f-099142594a49","html_url":"https://github.com/LKI/chinese-calendar","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LKI%2Fchinese-calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LKI%2Fchinese-calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LKI%2Fchinese-calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LKI%2Fchinese-calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LKI","download_url":"https://codeload.github.com/LKI/chinese-calendar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366204,"owners_count":20603438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","chinese-calendar","chinese-holiday","holidays","public-holidays","python","workdays"],"created_at":"2024-07-31T11:00:51.831Z","updated_at":"2025-03-24T22:34:48.243Z","avatar_url":"https://github.com/LKI.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Chinese Calendar\n\n[![Package](https://img.shields.io/pypi/v/chinesecalendar.svg)](https://pypi.python.org/pypi/chinesecalendar)\n[![Travis](https://img.shields.io/travis/LKI/chinese-calendar.svg)](https://travis-ci.org/LKI/chinese-calendar)\n[![License](https://img.shields.io/github/license/LKI/chinese-calendar.svg)](https://github.com/LKI/chinese-calendar/blob/master/LICENSE)\n[![README](https://img.shields.io/badge/简介-中文-brightgreen.svg)](https://github.com/LKI/chinese-calendar/blob/master/README.md)\n\nCheck if some date is workday or holiday in China.\nSupport 2004 ~ 2025.\n\n## Installation\n\n```\npip install chinesecalendar\n```\n\n## Upgrade\n\n```\npip install -U chinesecalendar\n```\n\nChinese government announces holiday arrangement usually during November.\nThis project will release new version after official announcement.\n\n## Sample\n\n``` python\nimport datetime\n\n# Check if 2018-04-30 is holiday in China\nfrom chinese_calendar import is_holiday, is_workday\napril_last = datetime.date(2018, 4, 30)\nassert is_workday(april_last) is False\nassert is_holiday(april_last) is True\n\n# or check and get the holiday name\nimport chinese_calendar as calendar  # 也可以这样 import\non_holiday, holiday_name = calendar.get_holiday_detail(april_last)\nassert on_holiday is True\nassert holiday_name == calendar.Holiday.labour_day.value\n\n# even check if a holiday is in lieu\nimport chinese_calendar\nassert chinese_calendar.is_in_lieu(datetime.date(2006, 2, 1)) is False\nassert chinese_calendar.is_in_lieu(datetime.date(2006, 2, 2)) is True\n```\n\n## Other Languages\n\nIf you fail to use Python directly,\nyou can translate the [constants file][constants.py] to get the complete chinese holiday arrangement.\n\n## Contributing\n\n1. Fork \u0026 Clone this project\n2. Modify [calendar definition file][scripts/data.py]\n3. Run [script][scripts/__init__.py] to generate the [constants file][constants.py]\n4. Create a PR\n\n[constants.py]: https://github.com/LKI/chinese-calendar/blob/master/chinese_calendar/constants.py\n[scripts/data.py]: https://github.com/LKI/chinese-calendar/blob/master/chinese_calendar/scripts/data.py\n[scripts/__init__.py]: https://github.com/LKI/chinese-calendar/blob/master/chinese_calendar/scripts/__init__.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLKI%2Fchinese-calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLKI%2Fchinese-calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLKI%2Fchinese-calendar/lists"}