Class ChineseMonth

java.lang.Object
org.miaixz.bus.core.center.date.chinese.ChineseMonth

public class ChineseMonth extends Object
农历月份表示 规范参考:GB/T 33661-2017 的6.2 农历月的命名法。
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getChineseMonthName(boolean isLeapMonth, int month, boolean isTraditional)
    获得农历月称呼 当为传统表示时,表示为二月,腊月,或者润正月等 当为非传统表示时,二月,十二月,或者润一月等
    static boolean
    isLeapMonth(int year, int month)
    当前农历月份是否为闰月

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ChineseMonth

      public ChineseMonth()
  • Method Details

    • isLeapMonth

      public static boolean isLeapMonth(int year, int month)
      当前农历月份是否为闰月
      Parameters:
      year - 农历年
      month - 农历月
      Returns:
      是否为闰月
    • getChineseMonthName

      public static String getChineseMonthName(boolean isLeapMonth, int month, boolean isTraditional)
      获得农历月称呼 当为传统表示时,表示为二月,腊月,或者润正月等 当为非传统表示时,二月,十二月,或者润一月等
      Parameters:
      isLeapMonth - 是否闰月
      month - 月份,从1开始,如果是闰月,应传入需要显示的月份
      isTraditional - 是否传统表示,例如一月传统表示为正月
      Returns:
      返回农历月份称呼