public class LunarDate extends Object implements Serializable
Calendar Minimum Maximum
Gregorian 1901/02/19 2101/01/28
LunarDate 1901/01/01 2100/12/29
| 限定符和类型 | 类和说明 |
|---|---|
static class |
LunarDate.LeapType |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getDay() |
java.time.LocalDate |
getGregorianDate() |
LunarDate.LeapType |
getLeapType() |
int |
getMonth() |
int |
getYear() |
static LunarDate |
ofDay(int year,
int month,
int day,
LunarDate.LeapType leapType)
get a instance by lunar date(year,month,day)
attention:LeapType.LEAP_0 Equivalent to LeapType.LEAP_0
|
static LunarDate |
ofDay(java.time.LocalDate gregorianDate)
get a instance by a gregorian date
|
static LunarDate[] |
ofMonth(int year,
int month,
LunarDate.LeapType leapType)
get a LunarDate array by lunar date, from first day of month to end day of month
attention:LeapType.LEAP_0 Equivalent to LeapType.LEAP_0
|
static LunarDate[] |
ofMonth(java.time.LocalDate gregorianDate)
get a LunarDate array by gregorian date, from first day of month to end day of month
|
LunarDate |
setGregorianDate(java.time.LocalDate gregorianDate)
set new gregorian date
|
LunarDate |
setLunarDate(int year,
int month,
int day,
LunarDate.LeapType leapType)
set a new lunar date
|
String |
toString() |
public static LunarDate ofDay(java.time.LocalDate gregorianDate) throws LunarException
gregorianDate - gregorian dateLunarException - Exception with reasonpublic static LunarDate ofDay(int year, int month, int day, LunarDate.LeapType leapType) throws LunarException
attention:LeapType.LEAP_0 Equivalent to LeapType.LEAP_0
year - lunar yearmonth - lunar monthday - lunar dayleapType - leap typeLunarException - Exception with reasonpublic static LunarDate[] ofMonth(java.time.LocalDate gregorianDate) throws LunarException
gregorianDate - gregorian date, only use year and monthLunarException - Exception with reasonpublic static LunarDate[] ofMonth(int year, int month, LunarDate.LeapType leapType) throws LunarException
attention:LeapType.LEAP_0 Equivalent to LeapType.LEAP_0
year - lunar date yearmonth - lunar date monthleapType - leap typeLunarException - Exception with reasonpublic java.time.LocalDate getGregorianDate()
public LunarDate setGregorianDate(java.time.LocalDate gregorianDate) throws LunarException
gregorianDate - gregorian dateLunarException - Exception with reasonpublic LunarDate setLunarDate(int year, int month, int day, LunarDate.LeapType leapType) throws LunarException
year - lunar yearmonth - lunar monthday - lunar dayleapType - leap typeLunarException - Exception with reasonpublic int getYear()
public int getMonth()
public LunarDate.LeapType getLeapType()
public int getDay()
Copyright © 2019. All rights reserved.