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

    Interface LocaleData

    Locale data for formatting

    Provides localized strings for all calendar elements: stems, branches, zodiac, month names, day names, and solar terms.

    interface LocaleData {
        code: LocaleCode;
        dayNames: (day: number) => string;
        festivals: Record<string, string>;
        gan: string[];
        monthNames: (month: number, leap: boolean) => string;
        solarTerms: string[];
        yearFormat: (ganZhi: string, zodiac: string) => string;
        zhi: string[];
        zodiac: string[];
    }
    Index

    Properties

    Locale code

    dayNames: (day: number) => string

    Get localized day name (e.g., "初一", "十五", "廿八")

    festivals: Record<string, string>

    Festival name mappings (key → localized name)

    gan: string[]

    Heavenly Stems (天干) in the locale's script

    monthNames: (month: number, leap: boolean) => string

    Get localized month name, with leap prefix if applicable

    solarTerms: string[]

    24 solar term names in the locale's script

    yearFormat: (ganZhi: string, zodiac: string) => string

    Format a year string from GanZhi and zodiac

    zhi: string[]

    Earthly Branches (地支) in the locale's script

    zodiac: string[]

    Zodiac animals in the locale's script