chinese-lunar-date API - v1.0.5
    Preparing search index...

    chinese-lunar-date API - v1.0.5

    chinese-lunar-date — Lunar Calendar Library Copyright (c) 2025 北京锋通科技有限公司 (郭玉峰, 吴琼). MIT License.

    A high-precision lunar calendar library based on astronomical algorithms (astronomia). Supports Chinese, Japanese, Korean, and Vietnamese calendar variants with 6 locales including Traditional Chinese (zh-TW, zh-HK).

    import { ChineseDate } from 'chinese-lunar-date'

    const date = ChineseDate.fromGregorian(2024, 6, 21)
    date.yearGanZhi // "甲辰"
    date.zodiac // "龙"
    date.zodiacName('zh-TW') // "龍"
    date.formatFull('zh-CN') // "甲辰龙年 五月初六"
    date.formatFull('zh-TW') // "甲辰龍年 五月初六"
    date.getFestivals() // []
    date.getSolarTerm() // null (not a solar term day)

    Classes

    ChineseDate
    JapaneseDate
    KoreanDate
    LunarDate
    VietnameseDate

    Interfaces

    CalendarConfig
    FestivalInfo
    GanZhiInfo
    GanZhiPair
    GregorianDate
    LocaleData
    LunarDateValue
    SolarTermInfo
    SolarTermResult

    Type Aliases

    CalendarType
    FormatToken
    LocaleCode
    PatternKey

    Variables

    CHINESE_CONFIG
    GAN
    JAPANESE_CONFIG
    KOREAN_CONFIG
    LOCALE_GAN
    LOCALE_SOLAR_TERMS
    LOCALE_ZHI
    LOCALE_ZODIAC
    PATTERNS
    VIETNAMESE_CONFIG
    ZHI

    Functions

    allGanZhi
    availableLocales
    dayGanZhi
    dayGanZhiStr
    festivalKeys
    findSolarTermOnDate
    format
    formatCompact
    formatFull
    formatGanZhi
    formatGanZhiFull
    formatISO
    fromJDE
    ganChar
    ganZhiToCycleIndex
    getConfig
    getFestivalDate
    getFestivals
    getFestivalsInYear
    getGanZhiInfo
    getLocale
    getMajorSolarTerm
    getMinorSolarTerm
    getQingming
    getSolarTerm
    getSolarTermJDE
    getSolarTermsInYear
    getWeekdayName
    getWeekdayShort
    gregorianToLunar
    inMajorSolarTerm
    isLeapMonth
    isLocaleSupported
    lunarToGregorian
    lunarToJDE
    majorSolarTermJDE
    midnight
    minorSolarTermJDE
    monthGanZhi
    monthGanZhiStr
    newYear
    nextNewMoon
    parseCompact
    parseGanZhi
    parseGregorian
    parseISO
    previousNewMoon
    solarTermJDE
    solarTermName
    solarTermNames
    toChineseNumber
    toChineseYear
    yearFromEpochCycle
    yearGanZhi
    yearGanZhiStr
    zhiChar
    zodiac
    zodiacEmoji
    zodiacFromGregorianYear
    zodiacIndex
    zodiacList