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

    Function yearGanZhi

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

    • Get year GanZhi from the cycle position

      In the 60-year cycle, year=1 is 甲子, year=2 is 乙丑, etc. The calculation uses the year position within the cycle to derive both the stem (gan) and branch (zhi) indices.

      Parameters

      Returns GanZhiPair

      GanZhi pair for the year

      yearGanZhi({ cycle: 78, year: 1, month: 1, leap: false, day: 1 })
      // { gan: 0, zhi: 0 } → 甲子