|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.common.util.DateUtil
public final class DateUtil
for possible iso patterns.
Constructor Summary | |
---|---|
DateUtil()
|
Method Summary | |
---|---|
static Calendar |
createCalendar(TimeZone zone,
int year,
int month,
int dayofMonth,
int hour,
int min,
int sec,
int milli)
Creates a new CalendarInstance in the given time zone for the given time settings. |
static Calendar |
createUTCCalendar(int year,
int month,
int dayofMonth,
int hour,
int min,
int sec,
int milli)
Creates a new CalendarInstance in the UTC time zone for the given time settings. |
static TimeZone |
createUTCTimeZone(int offset)
Creates UTC Timezone with given offset in millisec. |
static TimeZone |
createUTCTimeZone(int hour,
int minutes)
Creates UTC Timezone with given hour , minute offset. |
static Calendar |
fromISOString(String isoStr)
Method parses a iso formated date. |
static String |
tofullISOString(Calendar date)
Method formats a date to an iso formated string. |
static String |
tofullISOString(Date date)
Method formats a date to an iso formated string. |
static String |
toUTCISOString(Calendar date)
Method formats a date to an iso formated string. |
static String |
toUTCISOString(Date date)
Method formats a date to an iso formated string. |
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 Calendar createUTCCalendar(int year, int month, int dayofMonth, int hour, int min, int sec, int milli)
year
- the yearmonth
- the month (starting with index 1 (this is not like the
Calendar.set(int, int, int, int, int, int)
method).dayofMonth
- the day of month.hour
- the hour.min
- the min.sec
- the sec.milli
- the milli.
public static Calendar createCalendar(TimeZone zone, int year, int month, int dayofMonth, int hour, int min, int sec, int milli)
zone
- time zone.year
- the yearmonth
- the month (starting with index 1 (this is not like the
Calendar.set(int, int, int, int, int, int)
method).dayofMonth
- the day of month.hour
- the hour.min
- the min.sec
- the sec.milli
- the milli.
public static TimeZone createUTCTimeZone(int offset)
public static TimeZone createUTCTimeZone(int hour, int minutes)
hour
- the hour offset.minutes
- the minutes in the hour.
public static Calendar fromISOString(String isoStr) throws IllegalArgumentException
isoStr
- the iso format string.
IllegalArgumentException
- if isoStr can't be parsed.public static String toUTCISOString(Calendar date)
date
-
public static String toUTCISOString(Date date)
public static String tofullISOString(Date date)
date
- the date.
public static String tofullISOString(Calendar date)
date
- the date.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |