Class GanZhi
java.lang.Object
org.miaixz.bus.core.center.date.chinese.GanZhi
天干地支类
天干地支,简称为干支
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcyclicalm(int num) 传入 月日的offset 传回干支, 0=甲子static StringgetGanzhiOfDay(int year, int monthBase1, int day) 获取干支日static StringgetGanzhiOfMonth(int year, int month, int day) 获取干支月static StringgetGanzhiOfYear(int year) 传入年传回干支
-
Constructor Details
-
GanZhi
public GanZhi()
-
-
Method Details
-
cyclicalm
传入 月日的offset 传回干支, 0=甲子- Parameters:
num- 月日的offset- Returns:
- 干支
-
getGanzhiOfYear
传入年传回干支- Parameters:
year- 农历年- Returns:
- 干支
-
getGanzhiOfMonth
获取干支月- Parameters:
year- 公历年month- 公历月,从1开始day- 公历日- Returns:
- 干支月
-
getGanzhiOfDay
获取干支日- Parameters:
year- 公历年monthBase1- 公历月,从1开始day- 公历日- Returns:
- 干支
-