All Implemented Interfaces:
Almanac, Culture

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

    • NAMES

      public static final String[] NAMES
    • DAYS

      public static final int[] DAYS
      每月天数
    • year

      protected SolarYear year
    • month

      protected int month
  • Constructor Details

    • SolarMonth

      public SolarMonth(int year, int month)
      初始化
      Parameters:
      year - 年
      month - 月
  • Method Details

    • fromYm

      public static SolarMonth fromYm(int year, int month)
    • getSolarYear

      public SolarYear getSolarYear()
      公历年
      Returns:
      公历年
    • getYear

      public int getYear()
      Returns:
    • getMonth

      public int getMonth()
      Returns:
    • getDayCount

      public int getDayCount()
      天数(1582年10月只有21天)
      Returns:
      天数
    • getIndexInYear

      public int getIndexInYear()
      位于当年的索引(0-11)
      Returns:
      索引
    • getQuarter

      public SolarQuarter getQuarter()
      公历季度
      Returns:
      公历季度
    • getWeekCount

      public int getWeekCount(int start)
      周数
      Parameters:
      start - 起始星期,1234560分别代表星期一至星期天
      Returns:
      周数
    • getName

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

      public String toString()
      Overrides:
      toString in class Tradition
    • next

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

      public List<SolarWeek> getWeeks(int start)
      获取本月的公历周列表
      Parameters:
      start - 星期几作为一周的开始,1234560分别代表星期一至星期天
      Returns:
      周列表
    • getDays

      public List<SolarDay> getDays()
      获取本月的公历日列表
      Returns:
      公历日列表