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

    Function getSolarTermsInYear

    24 solar terms (二十四节气) calculation and naming. Odd-numbered terms are 节气 (minor), even-numbered are 中气 (major).

    • Get all 24 solar terms in a Gregorian year

      Returns an array of all 24 solar terms with their Gregorian dates and JDE values. Note that some terms from adjacent years may be included (e.g., 小寒 and 大寒 of the previous year's winter solstice cycle).

      Parameters

      • config: CalendarConfig

        Calendar configuration

      • gyear: number

        Gregorian year

      • locale: string = 'zh-CN'

        Locale for naming (default: 'zh-CN')

      Returns SolarTermInfo[]

      Array of 24 solar term info objects

      const terms = getSolarTermsInYear(CHINESE_CONFIG, 2024, 'zh-CN')
      terms.forEach(t => console.log(t.index, solarTermName(t.index, 'zh-TW'), t.date))