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

    Function ganChar

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

    • Get a Heavenly Stem (天干) character by index

      Parameters

      • index: number

        Stem index (0-9), wraps around for out-of-range values

      Returns string

      The corresponding Chinese character

      ganChar(0)  // "甲"
      ganChar(9) // "癸"