Class Solar.Quarter

java.lang.Object
org.aoju.bus.core.date.Solar.Quarter
Enclosing class:
Solar

public static class Solar.Quarter extends Object
阳历季度
  • Field Details

    • MONTH_COUNT

      public static final int MONTH_COUNT
      一个季度的月数
      See Also:
  • Constructor Details

    • Quarter

      public Quarter()
      默认当月
    • Quarter

      public Quarter(Date date)
      通过日期初始化
      Parameters:
      date - 日期
    • Quarter

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

    • from

      public static Solar.Quarter from(Date date)
      通过指定日期获取阳历季度
      Parameters:
      date - 日期
      Returns:
      阳历季度
    • from

      public static Solar.Quarter from(int year, int month)
      通过指定年月获取阳历季度
      Parameters:
      year - 年
      month - 月
      Returns:
      阳历季度
    • getYear

      public int getYear()
      获取年
      Returns:
    • getMonth

      public int getMonth()
      获取月
      Returns:
    • getIndex

      public int getIndex()
      获取当月是第几季度
      Returns:
      季度序号,从1开始
    • next

      public Solar.Quarter next(int seasons)
      季度推移
      Parameters:
      seasons - 推移的季度数,负数为倒推
      Returns:
      推移后的季度
    • getMonths

      public List<Solar.Month> getMonths()
      获取本季度的月份
      Returns:
      本季度的月份
    • build

      public String build(boolean... args)
      构建字符串内容
      Parameters:
      args - 可选参数-简化输出
      Returns:
      字符串内容