All Implemented Interfaces:
Almanac, Culture

public class SolarYear extends Loops
公历年
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • year

      protected int year
  • Constructor Details

    • SolarYear

      public SolarYear(int year)
  • Method Details

    • fromYear

      public static SolarYear fromYear(int year)
      从年初始化
      Parameters:
      year - 年,支持1到9999年
      Returns:
      公历年
    • getYear

      public int getYear()
      Returns:
    • getDayCount

      public int getDayCount()
      天数(1582年355天,平年365天,闰年366天)
      Returns:
      天数
    • isLeap

      public boolean isLeap()
      是否闰年(1582年以前,使用儒略历,能被4整除即为闰年。以后采用格里历,四年一闰,百年不闰,四百年再闰。)
      Returns:
      true/false
    • getName

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

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

      public List<SolarMonth> getMonths()
      月份列表
      Returns:
      月份列表,1年有12个月。
    • getSeasons

      public List<SolarQuarter> getSeasons()
      季度列表
      Returns:
      季度列表,1年有4个季度。
    • getHalfYears

      public List<SolarHalfYear> getHalfYears()
      半年列表
      Returns:
      半年列表,1年有2个半年。