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

    Function solarTermJDE

    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.

    • Get JDE of a specific solar term (1-24)

      Solar terms are numbered 1-24: 1=立春, 2=雨水, 3=惊蛰, 4=春分, ..., 23=小寒, 24=大寒. Odd numbers are minor terms (节气), even numbers are major terms (中气).

      For terms 1-3 (立春, 雨水, 惊蛰), the Gregorian year is adjusted backward by 1 because these terms belong to the previous solar year.

      Parameters

      • config: CalendarConfig

        Calendar configuration

      • term: number

        Solar term number (1-24)

      • gyear: number

        Gregorian year

      Returns number

      JDE of the solar term, adjusted to local midnight

      // 立春 (term 1) in 2024
      solarTermJDE(CHINESE_CONFIG, 1, 2024) // JDE for Feb 4, 2024
      // 清明 (term 5) in 2024
      solarTermJDE(CHINESE_CONFIG, 5, 2024) // JDE for Apr 4, 2024