# 6tail/lunar-javascript

日历、公历(阳历)、农历(阴历、老黄历)、佛历、道历，支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道黑道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.

Repository: https://github.com/6tail/lunar-javascript
Canonical: https://ross.abutalabs.com/products/lunar-javascript
Homepage: https://6tail.cn/calendar/api.html
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, calendar, lunar
Last push: 2025-11-05T12:20:14+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 50, release rhythm 55, longevity 100
- inputs: {"age_days": 2993, "days_push": 301, "days_rel": 301, "gap_med": 22.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1647, forks 292 (observed 2026-08-28T04:05:16.328145+00:00)

## What it is
A dependency-free JavaScript library for converting and querying Solar (Gregorian), Chinese Lunar, Buddhist, and Taoist calendars. It provides rich traditional Chinese calendar data including ganzhi (heavenly stems and earthly branches), zodiac animals, solar terms, festivals, Ba Zi (eight characters), auspicious/inauspicious activities, deity directions, and official Chinese statutory holidays.

## Use cases
- convert gregorian dates to chinese lunar calendar in javascript
- get chinese zodiac and ganzhi for a date
- compute ba zi (eight characters) from a birth date and time
- look up chinese statutory holidays and adjusted workdays
- find solar terms and traditional festivals for a year
- query auspicious days and daily yi/ji (宜忌) from the almanac
- build a lunar calendar widget for a web app

## When to choose
- you need accurate solar-lunar conversion with traditional Chinese calendar details in JavaScript/Node.js
- you want zero third-party dependencies
- you need Ba Zi, zodiac, solar terms, or almanac features
- you need Chinese statutory holiday and调休 data

## When to avoid
- you need true solar time calculations (not supported)
- you need a calendar for non-Chinese lunar systems like Islamic or Hebrew calendars
- you need i18n calendar formatting beyond what the library provides
- you work in a non-JavaScript stack (ports exist for other languages but this repo is JS)

## Facets
- artifact type: library
- maturity: stable
- function: date-time, sdk, developer-tools
- domain: developer-tools, cross-platform
- platform: browser, cross-platform
- tags: chinese-lunar-calendar, solar-calendar, almanac, ba-zi, eight-characters, traditional-chinese-calendar, holidays, solar-terms, zodiac, buddhist-calendar, taoist-calendar, zero-dependency, localization, nodejs, javascript

## Member repositories
- 6tail/lunar-javascript (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:16.328145+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:45:16.055828+00:00, confidence not recorded.
  - readme: https://github.com/6tail/lunar-javascript (fetched 2026-08-28T04:05:16.328145+00:00, sha b1a8361192eb)
  - homepage: https://6tail.cn/calendar/api.html (fetched 2026-08-29T11:18:43.031798+00:00, sha ae776d3ffa1e)
  - site_page: https://6tail.cn/calendar/holiday-util.about.html (fetched 2026-08-29T11:18:43.036157+00:00, sha 0242ceae049c)
  - registry_npm: https://registry.npmjs.org/lunar-javascript (fetched 2026-08-29T11:18:43.037625+00:00, sha 654a23a6f907)
  - site_page: https://6tail.cn/calendar/faq.html (fetched 2026-08-29T11:18:43.034304+00:00, sha 90631a4731fc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
