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

    Function fromJDE

    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 JDE to lunar date (public API)

      Given a JDE, determines the corresponding lunar date by finding the enclosing new moon and computing the cycle/year/month/day.

      Parameters

      • config: CalendarConfig

        Calendar configuration

      • jde: number

        Julian Ephemeris Day

      Returns LunarDateValue

      Lunar date value

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