|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sape.carboncontrib.utils.DateTimeUtils
Date and Time utilities.
Field Summary | |
private static int |
BUF_LEN
Buffer length for string buffer manipulation |
static String |
DATE_PATTERN
Date pattern. |
static String |
DATE_TIME_PATTERN
DateTime pattern. |
static String |
DATE_TIME_TZ_PATTERN
DateTimeTz pattern. |
static String |
GMT
GMT TimeZone ID |
private static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
DateTimeUtils()
|
Method Summary | |
static String |
formatGmtDate(Date date)
Formats a java.util.Date as a GMT date. |
static String |
formatGmtDateTime(Date date)
Formats a java.util.Date as a GMT date and time. |
static String |
formatGmtDateTimeTz(Date date)
Formats a java.util.Date as a GMT date, time and timezone. |
static SimpleDateFormat |
getGmtDateFormat()
Returns a SimpleDateFormat for GMT time zone and DATE_PATTERN pattern |
static SimpleDateFormat |
getGmtDateTimeFormat()
Returns a SimpleDateFormat for GMT time zone and DATE_TIME_PATTERN pattern |
static SimpleDateFormat |
getGmtDateTimeTzFormat()
Returns a SimpleDateFormat for GMT time zone and DATE_TIME_TZ_PATTERN pattern |
static SimpleDateFormat |
getSimpleDateFormat(TimeZone timeZone,
String pattern)
Returns a SimpleDateFormat for the specified time zone and formatting pattern (as specified by SimpleDateFormat). |
static Date |
parseGmtDate(String dateString)
Parses a GMT date to java.util.Date. |
static Date |
parseGmtDateTime(String dateTimeString)
Parses a GMT date time to java.util.Date. |
static Date |
parseGmtDateTimeTz(String dateTimeTzString)
Parses a GMT date, time, timezone to java.util.Date. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final org.apache.commons.logging.Log log
private static final int BUF_LEN
public static final String DATE_PATTERN
public static final String DATE_TIME_PATTERN
public static final String DATE_TIME_TZ_PATTERN
public static final String GMT
Constructor Detail |
public DateTimeUtils()
Method Detail |
public static final SimpleDateFormat getSimpleDateFormat(TimeZone timeZone, String pattern)
timeZone
- the time zone for the SimpleDateFormat.pattern
- the formatting pattern for the SimpleDateFormat.
public static final SimpleDateFormat getGmtDateFormat()
public static final SimpleDateFormat getGmtDateTimeFormat()
public static final SimpleDateFormat getGmtDateTimeTzFormat()
public static final String formatGmtDate(Date date)
date
- the date to be formatted
public static final String formatGmtDateTime(Date date)
date
- the date to be formatted
public static final String formatGmtDateTimeTz(Date date)
date
- the date to be formatted
public static final Date parseGmtDate(String dateString) throws ParseException
dateString
- the String to be converted to a Date.
ParseException
public static final Date parseGmtDateTime(String dateTimeString) throws ParseException
dateTimeString
- the String to be converted to a Date.
ParseException
public static final Date parseGmtDateTimeTz(String dateTimeTzString) throws ParseException
dateTimeTzString
- the String to be converted to a Date.
ParseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |