All Implemented Interfaces:
Almanac, Culture

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

    • month

      protected SolarMonth month
    • index

      protected int index
      索引,0-5
    • start

      protected Week start
      起始星期
  • Constructor Details

    • SolarWeek

      public SolarWeek(int year, int month, int index, int start)
      初始化
      Parameters:
      year - 年
      month - 月
      index - 索引,0-5
      start - 起始星期,1234560分别代表星期一至星期天
  • Method Details

    • fromYm

      public static SolarWeek fromYm(int year, int month, int index, int start)
    • getSolarMonth

      public SolarMonth getSolarMonth()
      公历月
      Returns:
      公历月
    • getYear

      public int getYear()
      Returns:
    • getMonth

      public int getMonth()
      Returns:
    • getIndex

      public int getIndex()
      索引
      Returns:
      索引,0-5
    • getIndexInYear

      public int getIndexInYear()
      位于当年的索引
      Returns:
      索引
    • getStart

      public Week getStart()
      起始星期
      Returns:
      星期
    • getName

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

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

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

      public SolarDay getFirstDay()
      本周第1天
      Returns:
      公历日
    • getDays

      public List<SolarDay> getDays()
      本周公历日列表
      Returns:
      公历日列表