Class LunarFestival

All Implemented Interfaces:
Almanac, Culture

public class LunarFestival extends Loops
农历传统节日(依据国家标准《农历的编算和颁行》GB/T 33661-2017)
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • NAMES

      public static final String[] NAMES
    • DATA

      public static String DATA
    • type

      protected EnumMap.Festival type
      类型
    • index

      protected int index
      索引
    • day

      protected LunarDay day
      农历日
    • solarTerms

      protected SolarTerms solarTerms
      节气
    • name

      protected String name
      名称
  • Constructor Details

  • Method Details

    • fromIndex

      public static LunarFestival fromIndex(int year, int index)
    • fromYmd

      public static LunarFestival fromYmd(int year, int month, int day)
    • next

      public LunarFestival next(int n)
      Description copied from interface: Culture
      推移
      Parameters:
      n - 推移步数
      Returns:
      this
    • getType

      public EnumMap.Festival getType()
      类型
      Returns:
      节日类型
    • getIndex

      public int getIndex()
      索引
      Returns:
      索引
    • getDay

      public LunarDay getDay()
      农历日
      Returns:
      农历日
    • getSolarTerm

      public SolarTerms getSolarTerm()
      节气,非节气返回null
      Returns:
      节气
    • getName

      public String getName()
      Description copied from interface: Almanac
      名称
      Returns:
      名称
    • toString

      public String toString()
      Overrides:
      toString in class Tradition