|
||||||||||
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 | |
---|---|
java.util.Date |
dateOnlyFormat(java.lang.String text)
Parse text in the format "yyyy-MM-dd" |
java.util.Date |
getISODate(java.lang.String text)
Parse the text in W3C profile of ISO 8601 format. |
java.lang.String |
getStandardDateOnlyString(java.util.Date date)
Deprecated. use toDateOnlyString |
java.lang.String |
getStandardDateString(java.util.Date date)
Deprecated. use toDateTimeStringISO |
java.lang.String |
getStandardDateString2(java.util.Date date)
Deprecated. use toDateTimeString |
java.util.Date |
isoDateNoSecsFormat(java.lang.String text)
Parse text in the format "yyyy-MM-dd'T'HH:mm" |
java.util.Date |
isoDateTimeFormat(java.lang.String text)
Parse text in the format "yyyy-MM-dd'T'HH:mm:ss" |
static void |
main(java.lang.String[] args)
test |
java.util.Date |
stdDateNoSecsFormat(java.lang.String text)
Parse text in the format "yyyy-MM-dd HH:mm" |
java.util.Date |
stdDateTimeFormat(java.lang.String text)
Parse text in the format "yyyy-MM-dd HH:mm:ss" |
java.lang.String |
toDateOnlyString(java.util.Date date)
date only format= yyyy-MM-dd |
java.lang.String |
toDateString(java.util.Date date)
Deprecated. use toDateOnlyString |
java.lang.String |
toDateTimeString(java.util.Date date)
"standard date format" = yyyy-MM-dd HH:mm:ssZ |
java.lang.String |
toDateTimeStringISO(java.util.Date date)
"ISO date format" = yyyy-MM-dd'T'HH:mm:ssZ |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateFormatter()
Method Detail |
---|
public java.util.Date getISODate(java.lang.String text)
text
- parse this text
public java.util.Date stdDateTimeFormat(java.lang.String text) throws java.text.ParseException
text
- parse this text
java.text.ParseException
- if not formatted correctlypublic java.util.Date stdDateNoSecsFormat(java.lang.String text) throws java.text.ParseException
text
- parse this text
java.text.ParseException
- if not formatted correctlypublic java.util.Date isoDateTimeFormat(java.lang.String text) throws java.text.ParseException
text
- parse this text
java.text.ParseException
- if not formatted correctlypublic java.util.Date isoDateNoSecsFormat(java.lang.String text) throws java.text.ParseException
text
- parse this text
java.text.ParseException
- if not formatted correctlypublic java.util.Date dateOnlyFormat(java.lang.String text) throws java.text.ParseException
text
- parse this text
java.text.ParseException
- if not formatted correctlypublic java.lang.String getStandardDateOnlyString(java.util.Date date)
public java.lang.String toDateString(java.util.Date date)
public java.lang.String toDateOnlyString(java.util.Date date)
date
- format this date
public java.lang.String getStandardDateString2(java.util.Date date)
public java.lang.String toDateTimeString(java.util.Date date)
date
- format this date
public java.lang.String getStandardDateString(java.util.Date date)
public java.lang.String toDateTimeStringISO(java.util.Date date)
date
- format this date
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |