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

    Function lunarToJDE

    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 JDE

      Computes the JDE corresponding to a given lunar date by finding the new moon that starts the month and adding the day offset.

      Parameters

      • config: CalendarConfig

        Calendar configuration

      • value: LunarDateValue

        Lunar date value

      • Optionalgyear: number

        Optional Gregorian year hint (optimizes computation)

      Returns number

      JDE of the lunar date

      lunarToJDE(CHINESE_CONFIG, { cycle: 78, year: 34, month: 5, leap: false, day: 6 })
      // 2460481.5 (JDE for 2024-06-21)