public class ChineseDate extends Object
Constructor and Description |
---|
ChineseDate(Date date)
通过公历日期构造
|
ChineseDate(int chineseYear,
int chineseMonth,
int chineseDay)
构造方法传入日期
|
Modifier and Type | Method and Description |
---|---|
String |
getChineseDay()
获得农历日
|
String |
getChineseMonth()
获得农历月份(中文,例如二月,十二月,或者润一月)
|
String |
getChineseMonthName()
获得农历月称呼(中文,例如二月,腊月,或者润正月)
|
int |
getChineseYear()
获得农历年份
|
String |
getChineseZodiac()
获得年份生肖
|
String |
getCyclical()
获得年的天干地支
|
String |
getCyclicalYMD()
干支纪年信息
|
int |
getDay()
获取农历的日,从1开始计数
|
String |
getFestivals()
获得节日
|
int |
getMonth()
获取农历的月,从1开始计数
|
boolean |
isLeapMonth()
当前农历月份是否为闰月
|
String |
toString() |
String |
toStringNormal()
转换为标准的日期格式来表示农历日期,例如2020-01-13
|
public ChineseDate(Date date)
date
- 公历日期public ChineseDate(int chineseYear, int chineseMonth, int chineseDay)
chineseYear
- 农历年chineseMonth
- 农历月,1表示一月(正月)chineseDay
- 农历日,1表示初一public int getChineseYear()
public int getMonth()
public boolean isLeapMonth()
public String getChineseMonth()
public String getChineseMonthName()
public int getDay()
public String getChineseDay()
public String getFestivals()
public String getChineseZodiac()
public String getCyclical()
public String getCyclicalYMD()
public String toStringNormal()
Copyright © 2021. All rights reserved.