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

    Function getGanZhiInfo

    Heavenly Stems (天干) and Earthly Branches (地支) calculations. Used for year/month/day pillars in traditional Chinese timekeeping.

    • Get full GanZhi info for a date (year, month, day pillars)

      This provides the three pillars of the 四柱八字 (Four Pillars of Destiny), minus the hour pillar which requires time-of-day information.

      Parameters

      • value: LunarDateValue

        Lunar date value

      • jde: number

        Julian Ephemeris Day (needed for day pillar calculation)

      Returns GanZhiInfo

      Complete GanZhi info with year, month, and day pairs

      const info = getGanZhiInfo(value, jde)
      // { year: { gan: 0, zhi: 0 }, month: { gan: 2, zhi: 2 }, day: { gan: 0, zhi: 0 } }