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

    Function yearFromEpochCycle

    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 Gregorian year from lunar cycle/year

      Converts the cycle/year pair to a Gregorian year number using the calendar's epoch year.

      Parameters

      • config: CalendarConfig

        Calendar configuration (provides epoch year)

      • cycle: number

        60-year cycle number (1-based)

      • year: number

        Year within the cycle (1-60)

      Returns number

      Gregorian year number

      yearFromEpochCycle(CHINESE_CONFIG, 78, 34)  // 2024
      yearFromEpochCycle(KOREAN_CONFIG, 78, 34) // 2024 (same year, different epoch offset)