|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.enterprise.util.DateUtil
Some date utility functions. The valid date range is [1.1.0001, 31.12.9999], whereby the range [5.10.1582, 14.10.1582] is excluded. Until 4.10.1582, the Julian calendar is used (every 4th year is a leap year). Beginning at 15.10.1582, the Gregorian calender is put into action (still every 4th year is a leap year, without every 100th, and the exception from the exception is every 400th).
Many of the methods use string representations to denote a date, the format used is at any time YYYYMMDD.
| Nested Class Summary | |
static class |
DateUtil.DMY
Represents the components of a date. |
| Constructor Summary | |
DateUtil()
|
|
| Method Summary | |
static java.lang.String |
date2Internal(java.util.Date d)
Converts a java.util.Date to the internal format |
static java.lang.String |
DMY2Internal(DateUtil.DMY dmy)
Converts a DMY structure to the ISO format YYYYMMDD |
static DateUtil.DMY |
getDMY(java.util.GregorianCalendar c)
Returns components out of GregorianCalendar. |
static java.util.Date |
internal2Date(java.lang.String internal)
Converts the internal date format to a java.util.Date |
static DateUtil.DMY |
internal2DMY(java.lang.String internal)
Converts the ISO string YYYYMMDD to the components. |
static java.util.GregorianCalendar |
internal2Gregorian(java.lang.String internal)
Converts an YYYMMDD string to a newly created GregorianCalendar. |
static boolean |
isLeapYear(int year)
Calculates if a year is a leap year. |
static boolean |
isValid(DateUtil.DMY dmy)
Returns true if the provided components represent a valid date |
static boolean |
isValid(java.lang.String internal)
Checks if the provided String is a valid YYYYMMDD string. |
static void |
resetTime(java.util.GregorianCalendar cal)
Sets the time in the given cal to 00:00:00.000 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateUtil()
| Method Detail |
public static boolean isLeapYear(int year)
year - the input year
public static boolean isValid(DateUtil.DMY dmy)
public static DateUtil.DMY getDMY(java.util.GregorianCalendar c)
c - the input calendar
public static java.lang.String date2Internal(java.util.Date d)
public static java.util.Date internal2Date(java.lang.String internal)
public static DateUtil.DMY internal2DMY(java.lang.String internal)
internal - string following YYYYMMDD with isValid yielding true.
public static boolean isValid(java.lang.String internal)
public static java.util.GregorianCalendar internal2Gregorian(java.lang.String internal)
internal - string following the syntax YYYYMMDD
public static java.lang.String DMY2Internal(DateUtil.DMY dmy)
public static void resetTime(java.util.GregorianCalendar cal)
|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||