|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.commons.DateUtil
public class DateUtil
Utility class providing methods for date manipulation such as formatting dates to strings and vice versa.
| Field Summary | |
|---|---|
static String |
DATE_FORMAT_NO_MILLIS
Date format without a milliseconds component. |
static TimeZone |
defaultTZ
The default time zone (UTC). |
static String |
PAP_DATE_FORMAT
The format of dates for PAP. |
| Constructor Summary | |
|---|---|
DateUtil()
|
|
| Method Summary | |
|---|---|
static String |
formatDate(String format,
Date date)
Generic date formatter. |
static String |
formatDate(String format,
Date date,
TimeZone zone)
Generic date formatter. |
static String |
formatPapDate(Date date)
Formats a date in PAP date format. |
static Date |
parsePapDate(String strDate)
Parses out a date from a string in PAP date format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final TimeZone defaultTZ
public static final String PAP_DATE_FORMAT
public static final String DATE_FORMAT_NO_MILLIS
| Constructor Detail |
|---|
public DateUtil()
| Method Detail |
|---|
public static Date parsePapDate(String strDate)
throws ParseException
strDate - a string in PAP date format
ParseException - if the string could not be parsedpublic static String formatPapDate(Date date)
date - the date to be formatted
public static String formatDate(String format,
Date date)
format - the date format to be useddate - the date to be formatted
public static String formatDate(String format,
Date date,
TimeZone zone)
format - the date format to be useddate - the date to be formatted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||