calendar

A JavaScript calendar component and library for converting between the Chinese lunar calendar and the Gregorian calendar, including festivals, heavenly stems and earthly branches, and zodiac signs.

Share on XLicense: MIT

Overview

This project is a JavaScript library and web component for converting between the Chinese lunar calendar and the Gregorian calendar. The algorithm follows the Chinese national standard GB/T 33661-2017. A conversion returns the lunar and solar date, leap month flag, heavenly stem and earthly branch names, zodiac animal, solar term, zodiac sign and festival. It also provides a calendar element with select, change and init events.

Key features

  • Converts between lunar and Gregorian dates
  • Returns stem-branch names, zodiac animal, solar term and festival
  • Follows the national standard GB/T 33661-2017
  • Web component with onSelect, onChange and onInit events

Best for

Web developers who need lunar date conversion or a ready calendar widget for Chinese calendar information.

Upstream
mumuy/calendar
Fork on GitHub
Guo-astro/calendar
Upstream stars
137
Category
Developer tools and infrastructure
Language
JavaScript
License
MIT
Forked
2025-12-13
Sync status
In syncLast synced 2026-09-29