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

public class GanZhi extends Object
天干地支类 天干地支,简称为干支
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • GanZhi

      public GanZhi()
  • Method Details

    • cyclicalm

      public static String cyclicalm(int num)
      传入 月日的offset 传回干支, 0=甲子
      Parameters:
      num - 月日的offset
      Returns:
      干支
    • getGanzhiOfYear

      public static String getGanzhiOfYear(int year)
      传入年传回干支
      Parameters:
      year - 农历年
      Returns:
      干支
    • getGanzhiOfMonth

      public static String getGanzhiOfMonth(int year, int month, int day)
      获取干支月
      Parameters:
      year - 公历年
      month - 公历月,从1开始
      day - 公历日
      Returns:
      干支月
    • getGanzhiOfDay

      public static String getGanzhiOfDay(int year, int monthBase1, int day)
      获取干支日
      Parameters:
      year - 公历年
      monthBase1 - 公历月,从1开始
      day - 公历日
      Returns:
      干支