|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.common.MCRCalendar
public class MCRCalendar
This class implements all methods for handling calendars in MyCoRe objects and data models. It use the GPL licensed ICU library of IBM.
| Field Summary | |
|---|---|
static String[] |
CALENDARS_ICU
all available calendars of ICU |
static String[] |
CALENDARS_INPUT
convert following calendars from input to gregorian |
(package private) static Logger |
LOGGER
Logger |
static int |
MAX_JULIAN_DAY_NUMBER
Maximum Julian Day number is 3182057 = 31.12.3999 |
static int |
MIN_JULIAN_DAY_NUMBER
Minimum Julian Day number is 0 = 01.01.4713 BC |
static String |
TAG_ARMENIAN
|
static String |
TAG_BUDDHIST
Tag for calendars |
static String |
TAG_CHINESE
|
static String |
TAG_COPTIC
|
static String |
TAG_EGYPTIAN
|
static String |
TAG_ETHIOPIC
|
static String |
TAG_GREGORIAN
|
static String |
TAG_HEBREW
|
static String |
TAG_ISLAMIC
|
static String |
TAG_ISLAMIC_CIVIL
|
static String |
TAG_JAPANESE
|
static String |
TAG_JULIAN
|
static String |
TAG_PERSIC
|
| Constructor Summary | |
|---|---|
MCRCalendar()
|
|
| Method Summary | |
|---|---|
static String |
getDateToFormattedString(com.ibm.icu.util.Calendar date)
This method returns the date as string in format 'dd.MM.yyyy G'. |
static String |
getDateToFormattedString(com.ibm.icu.util.Calendar date,
String format)
This method returns the date as string. |
static com.ibm.icu.util.GregorianCalendar |
getGregorianHistoryDate(String datestr,
boolean last)
This method convert a ancient date to a GregorianCalendar value. |
static com.ibm.icu.util.GregorianCalendar |
getGregorianHistoryDate(String datestr,
boolean last,
String calstr)
This method convert a ancient date to a GregorianCalendar value. |
static int |
getJulianDayNumber(com.ibm.icu.util.Calendar date)
This method return the Julian Day number for a given Calendar instance. |
static boolean |
testHistoryDate(String datestr,
boolean last,
String calstr)
This method test a ancient date string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static Logger LOGGER
public static String TAG_BUDDHIST
public static String TAG_CHINESE
public static String TAG_COPTIC
public static String TAG_ETHIOPIC
public static String TAG_GREGORIAN
public static String TAG_HEBREW
public static String TAG_ISLAMIC
public static String TAG_ISLAMIC_CIVIL
public static String TAG_JAPANESE
public static String TAG_JULIAN
public static String TAG_PERSIC
public static String TAG_ARMENIAN
public static String TAG_EGYPTIAN
public static int MIN_JULIAN_DAY_NUMBER
public static int MAX_JULIAN_DAY_NUMBER
public static String[] CALENDARS_ICU
public static String[] CALENDARS_INPUT
| Constructor Detail |
|---|
public MCRCalendar()
| Method Detail |
|---|
public static final com.ibm.icu.util.GregorianCalendar getGregorianHistoryDate(String datestr,
boolean last)
throws MCRException
datestr - the date as string.last - the value is true if the date should be filled with the
highest value of month or day like 12 or 31 else it fill the
date with the lowest value 1 for month and day.
a - MCRException if parsing has an error
MCRException
public static final com.ibm.icu.util.GregorianCalendar getGregorianHistoryDate(String datestr,
boolean last,
String calstr)
throws MCRException
datestr - the date as string.last - the value is true if the date should be filled with the
highest value of month or day like 12 or 31 else it fill the
date with the lowest value 1 for month and day.calstr - the calendar as String, kind of the calendar name
('gregorian', 'julian', 'islamic', 'coptic', 'ethiopic',
'buddhist', 'japanese', 'persic', 'armenian', 'egyptian')
a - MCRException if parsing has an error
MCRException
public static final boolean testHistoryDate(String datestr,
boolean last,
String calstr)
datestr - the date as string.last - the value is true if the date should be filled with the
highest value of month or day like 12 or 31 else it fill the
date with the lowest value 1 for month and day.calstr - the calendar as String, kind of the calendar ('gregorian',
'julian', 'islamic', 'coptic', 'ethiopic', 'buddhist',
'japanese', 'persic', ''armenian, 'egyptian')
public static final int getJulianDayNumber(com.ibm.icu.util.Calendar date)
date - an instance of a Calendar
public static final String getDateToFormattedString(com.ibm.icu.util.Calendar date)
date - the GregorianCalendar date
public static final String getDateToFormattedString(com.ibm.icu.util.Calendar date,
String format)
date - the GregorianCalendar dateformat - the format of the date as String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||