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

    Function lunarToGregorian

    Low-level pure functions for calendar conversion. Most users should prefer the ChineseDate value object API. These functions are useful when you need fine-grained control or want to build custom logic on top of the core algorithms.

    • Convert lunar date to Gregorian date

      The inverse of gregorianToLunar. Converts a lunar date value to its corresponding Gregorian calendar date.

      Parameters

      • config: CalendarConfig

        Calendar configuration

      • value: LunarDateValue

        Lunar date value

      • Optionalgyear: number

        Optional Gregorian year hint (optimizes computation)

      Returns GregorianDate

      Gregorian date object

      lunarToGregorian(CHINESE_CONFIG, { cycle: 78, year: 34, month: 5, leap: false, day: 6 })
      // { year: 2024, month: 6, day: 21 }