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

    Function getFestivals

    Traditional lunar calendar festivals with region-aware naming. Different regions may observe different festivals or use different names.

    • Get festivals that fall on a specific lunar date

      Returns all festivals matching the given lunar date, filtered by the locale's region. For example, zh-HK will return "農曆新年" instead of "春节", and will not return "小年(北方)" which is only observed in mainland China.

      Parameters

      • value: LunarDateValue

        Lunar date value

      • locale: string = 'zh-CN'

        Locale code (default: 'zh-CN')

      Returns FestivalInfo[]

      Array of matching festival info objects

      // 正月初一
      getFestivals({ cycle: 78, year: 34, month: 1, leap: false, day: 1 }, 'zh-CN')
      // [{ name: "春节", key: "spring", month: 1, day: 1, leap: false }]

      getFestivals({ cycle: 78, year: 34, month: 1, leap: false, day: 1 }, 'zh-HK')
      // [{ name: "農曆新年", key: "spring", month: 1, day: 1, leap: false }]