|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectucar.nc2.units.DateFormatter
public class DateFormatter
Date parsing and formatting. Always uses GMT. These are not thread-safe.
| Constructor Summary | |
|---|---|
DateFormatter()
|
|
| Method Summary | |
|---|---|
Date |
dateOnlyFormat(String text)
Parse text in the format "yyyy-MM-dd" |
Date |
getISODate(String text)
Parse the text in W3C profile of ISO 8601 format. |
String |
getStandardDateOnlyString(Date date)
Deprecated. use toDateOnlyString |
String |
getStandardDateString(Date date)
Deprecated. use toDateTimeStringISO |
String |
getStandardDateString2(Date date)
Deprecated. use toDateTimeString |
Date |
isoDateNoSecsFormat(String text)
Parse text in the format "yyyy-MM-dd'T'HH:mm" |
Date |
isoDateTimeFormat(String text)
Parse text in the format "yyyy-MM-dd'T'HH:mm:ss" |
static void |
main(String[] args)
test |
Date |
stdDateNoSecsFormat(String text)
Parse text in the format "yyyy-MM-dd HH:mm" |
Date |
stdDateTimeFormat(String text)
Parse text in the format "yyyy-MM-dd HH:mm:ss" |
String |
toDateOnlyString(Date date)
date only format= yyyy-MM-dd |
String |
toDateString(Date date)
Deprecated. use toDateOnlyString |
String |
toDateTimeString(Date date)
"standard date format" = yyyy-MM-dd HH:mm:ssZ |
String |
toDateTimeStringISO(Date date)
"ISO date format" = yyyy-MM-dd'T'HH:mm:ssZ |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateFormatter()
| Method Detail |
|---|
public Date getISODate(String text)
text - parse this text
public Date stdDateTimeFormat(String text)
throws ParseException
text - parse this text
ParseException - if not formatted correctly
public Date stdDateNoSecsFormat(String text)
throws ParseException
text - parse this text
ParseException - if not formatted correctly
public Date isoDateTimeFormat(String text)
throws ParseException
text - parse this text
ParseException - if not formatted correctly
public Date isoDateNoSecsFormat(String text)
throws ParseException
text - parse this text
ParseException - if not formatted correctly
public Date dateOnlyFormat(String text)
throws ParseException
text - parse this text
ParseException - if not formatted correctlypublic String getStandardDateOnlyString(Date date)
public String toDateString(Date date)
public String toDateOnlyString(Date date)
date - format this date
public String getStandardDateString2(Date date)
public String toDateTimeString(Date date)
date - format this date
public String getStandardDateString(Date date)
public String toDateTimeStringISO(Date date)
date - format this date
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||