public final class LunarCalendarUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_YEAR
支持转换的最大农历年份
|
static int |
MIN_YEAR
支持转换的最小农历年份
|
| Modifier and Type | Method and Description |
|---|---|
static int |
daysInMonth(int year,
int month)
传回农历year年month月的总天数
|
static int |
daysInMonth(int year,
int month,
boolean leap)
传回农历year年month月的总天数
|
static int |
leapMonth(int year)
传回农历 year年闰哪个月 1-12 , 没闰传回 0
|
static int[] |
lunarToSolar(int year,
int month,
int monthDay,
boolean isLeapMonth)
将农历日期转换为公历日期
|
static int[] |
solarToLunar(int year,
int month,
int monthDay) |
static int[] |
solarToLunarDeprecated(int year,
int month,
int monthDay)
Deprecated.
不准确
|
public static final int MIN_YEAR
public static final int MAX_YEAR
public static int[] lunarToSolar(int year,
int month,
int monthDay,
boolean isLeapMonth)
year - 农历年份month - 农历月monthDay - 农历日isLeapMonth - 该月是否是闰月public static int[] solarToLunar(int year,
int month,
int monthDay)
@Deprecated
public static int[] solarToLunarDeprecated(int year,
int month,
int monthDay)
year - month - monthDay - public static int daysInMonth(int year,
int month)
year - 要计算的年份month - 要计算的月public static int daysInMonth(int year,
int month,
boolean leap)
year - 要计算的年份month - 要计算的月leap - 当月是否是闰月public static int leapMonth(int year)
year - 将要计算的年份