Class ChineseMonth
java.lang.Object
org.miaixz.bus.core.center.date.chinese.ChineseMonth
农历月份表示
规范参考:GB/T 33661-2017 的6.2 农历月的命名法。
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetChineseMonthName(boolean isLeapMonth, int month, boolean isTraditional) 获得农历月称呼 当为传统表示时,表示为二月,腊月,或者润正月等 当为非传统表示时,二月,十二月,或者润一月等static booleanisLeapMonth(int year, int month) 当前农历月份是否为闰月
-
Constructor Details
-
ChineseMonth
public ChineseMonth()
-
-
Method Details
-
isLeapMonth
public static boolean isLeapMonth(int year, int month) 当前农历月份是否为闰月- Parameters:
year- 农历年month- 农历月- Returns:
- 是否为闰月
-
getChineseMonthName
获得农历月称呼 当为传统表示时,表示为二月,腊月,或者润正月等 当为非传统表示时,二月,十二月,或者润一月等- Parameters:
isLeapMonth- 是否闰月month- 月份,从1开始,如果是闰月,应传入需要显示的月份isTraditional- 是否传统表示,例如一月传统表示为正月- Returns:
- 返回农历月份称呼
-