Package org.aoju.bus.core.date
Class Solar.Semester
java.lang.Object
org.aoju.bus.core.date.Solar.Semester
- Enclosing class:
- Solar
阳历半年
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(boolean... args) 构建字符串内容static Solar.Semesterfrom(int year, int month) 通过指定年月获取阳历半年static Solar.Semester通过指定日历获取阳历半年static Solar.Semester通过指定日期获取阳历半年intgetIndex()获取当月是第几半年intgetMonth()获取月获取本半年的月份intgetYear()获取年next(int halfYears) 半年推移
-
Field Details
-
MONTH_COUNT
public static final int MONTH_COUNT半年的月数- See Also:
-
-
Constructor Details
-
Semester
public Semester()默认当月 -
Semester
通过日期初始化- Parameters:
date- 日期
-
Semester
通过日历初始化- Parameters:
calendar- 日历
-
Semester
public Semester(int year, int month) 通过年月初始化- Parameters:
year- 年month- 月
-
-
Method Details
-
from
通过指定日期获取阳历半年- Parameters:
date- 日期- Returns:
- 阳历半年
-
from
通过指定日历获取阳历半年- Parameters:
calendar- 日历- Returns:
- 阳历半年
-
from
通过指定年月获取阳历半年- Parameters:
year- 年month- 月- Returns:
- 阳历半年
-
getYear
public int getYear()获取年- Returns:
- 年
-
getMonth
public int getMonth()获取月- Returns:
- 月
-
getIndex
public int getIndex()获取当月是第几半年- Returns:
- 半年序号,从1开始
-
next
半年推移- Parameters:
halfYears- 推移的半年数,负数为倒推- Returns:
- 推移后的半年
-
getMonths
获取本半年的月份- Returns:
- 本半年的月份列表
-
build
构建字符串内容- Parameters:
args- 可选参数-简化输出- Returns:
- 字符串内容
-