No Description

Yaavi c0e93bf394 feat: test coverage 100% 2 months ago
.github 9793ddbcb3 chore: workflow 8 months ago
docs afc4b948af chore: docs 6 months ago
scripts c29e62a012 feat: update holiday days by year 8 months ago
src c0e93bf394 feat: test coverage 100% 2 months ago
test c0e93bf394 feat: test coverage 100% 2 months ago
.gitignore 54d1cb2b14 update .gitignore 8 months ago
CHANGELOG.md f8d2873523 docs: add Lunar Folk Festival 6 months ago
LICENSE 1e643eb901 Initial commit 1 year ago
README.en.md 6e6e8316d0 chore: readme 8 months ago
README.md 6e6e8316d0 chore: readme 8 months ago
debug_lunar.js c0e93bf394 feat: test coverage 100% 2 months ago
jest.config.ts 826e26da6f feat: enable coverage collection 8 months ago
package-lock.json d32e59d88c build(deps-dev): bump axios from 1.7.5 to 1.8.2 3 months ago
package.json fab3350944 1.5.0 6 months ago
tsconfig.json 5bd6b5bc6d feat: v0.1.0 1 year ago
vite.config.ts bb73694d7b v1.2.1 1 year ago

README.en.md

Chinese Days

NPM Version GitHub License README

This project provides a series of functions for querying Chinese holidays, adjusted working days, working days, 24 solar terms, and converting between lunar and solar calendars. Additionally, it supports ics file subscription for holidays, which can be subscribed to by Google Calendar, Apple Calendar, Microsoft Outlook, and other clients.

Documentation

To check out docs, visit chinese-days.yaavi.me.

The holiday information will be updated according to the announcements from the State Council.

  • Holidays: Supports the years 2004 to 2025, including the extended Spring Festival of 2020.
  • 24 Solar Terms: Supports the years 1900 to 2100.
  • Lunar Days: Supports the years 1900 to 2100.

Subscribe to Calendar

The subscribed calendar includes holidays and adjusted working days for the past three years (2023-2025).

Subscription URL: https://cdn.jsdelivr.net/npm/chinese-days/dist/holidays.ics (default language is Chinese)

For English: https://cdn.jsdelivr.net/npm/chinese-days/dist/holidays.en.ics

For non-JS projects, you can use the JSON file

A JSON file of Chinese holidays is provided and can be directly referenced through this link: chinese-days.json.

For example, in Java, you can refer to Warnier-zhang/java-chinese-days, which is only for querying Chinese holidays, in-lieu days, and regular workdays.

Contributing

  1. Fork + Clone the project to your local machine;
  2. Holidays: Modify the holiday definitions;
  3. Lunar definitions: Modify the lunar definitions;
  4. For other modifications, refer to the source code yourself;
  5. Submit a PR.

Acknowledgements

  1. Lunar calendar data is sourced from the Bigkoo/Android-PickerView project.
  2. Chinese holiday data generation references the Python version of the LKI/chinese-calendar project.