|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.p13n.model.XmlDateTimeUtil
public class XmlDateTimeUtil
ISO8601 date utility. This class will read and write the correct ISO standard date, time, and timeInstant tags
Constructor Summary | |
---|---|
XmlDateTimeUtil()
Default constructor. |
Method Summary | |
---|---|
static Calendar |
convert(Calendar xmlCal)
Convert a Calendar from xbeans into a regular ol' Calendar. |
static String |
formatDate(Calendar aDate)
Format a calendar instance in ISO8601 standard (yyyy-MM-ddZ). |
static String |
formatDate(Date aDate)
Format a date in ISO8601 standard (yyyy-MM-ddZ). |
static String |
formatTime(Calendar aTime)
Format a time in ISO8601 standard (HH:mm:ssZ) without the fractions of a second portion. |
static String |
formatTime(Calendar aTime,
boolean includeFraction)
Format a time in ISO8601 standard (HH:mm:ss(.fff)?Z). |
static String |
formatTime(Date aTime)
Format a time in ISO8601 standard (HH:mm:ss?Z) without the fractions of a second portion. |
static String |
formatTime(Date aTime,
boolean includeFraction)
Format a time in ISO8601 standard (HH:mm:ss(.fff)?Z). |
static String |
formatTimeInstant(Calendar aDateTime)
Format a date-time in ISO8601 standard (yyyy-MM-ddTHH:mm:ssZ). |
static String |
formatTimeInstant(Calendar aDateTime,
boolean includeFraction)
Format a date-time in ISO8601 standard (yyyy-MM-ddTHH:mm:ss(.fff)?Z). |
static String |
formatTimeInstant(Date aDateTime)
Format a date-time in ISO8601 standard (yyyy-MM-ddTHH:mm:ssZ). |
static String |
formatTimeInstant(Date aDateTime,
boolean includeFraction)
Format a date-time in ISO8601 standard (yyyy-MM-ddTHH:mm:ss(.fff)?Z). |
static Calendar |
readDate(String aDate)
Parse the IS08601 date string (yyyy-MM-ddZ) into a calendar instance. |
static Date |
readDateAsDate(String aDate)
Parse the IS08601 date string (yyyy-MM-ddZ) into a Date. |
static Calendar |
readTime(String aTime)
Parse the ISO8601 formatted time into a calendar. |
static Date |
readTimeAsDate(String aTime)
Parse the ISO8601 formatted time into a Date. |
static Calendar |
readTimeInstant(String aDateTime)
Parse the ISO8601 formatted timeInstant string into a calendar. |
static Date |
readTimeInstantAsDate(String aDateTime)
Parse the ISO8601 formatted timeInstant string into a Date. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlDateTimeUtil()
Method Detail |
---|
public static String formatDate(Date aDate)
aDate
- the date to format
public static String formatDate(Calendar aDate)
aDate
- the calendar to format.
public static Date readDateAsDate(String aDate)
aDate
- the date string.
IllegalArgumentException
- on invalid string.public static Calendar readDate(String aDate)
aDate
- the date string.
IllegalArgumentException
- on invalid string.public static String formatTime(Date aTime, boolean includeFraction)
aTime
- the date contained the time to format.includeFraction
- true to include the fractions of a second (.fff)
portion in the results, false to not.
public static String formatTime(Date aTime)
aTime
- the date containing the time to format.
public static String formatTime(Calendar aTime, boolean includeFraction)
aTime
- the calendar containing the time to format.includeFraction
- true to include the fractions of a second (.fff)
portion in the results, false to not.
public static String formatTime(Calendar aTime)
aTime
- the calendar containing the time to format.
public static Date readTimeAsDate(String aTime)
IllegalArgumentException
- on invalid string.readTime(java.lang.String)
public static Calendar readTime(String aTime)
IllegalArgumentException
- on invalid string.public static String formatTimeInstant(Date aDateTime, boolean includeFraction)
aDateTime
- the date with the date and time.includeFraction
- true to include the fractions of a second (.fff)
portion in the results, false to not.
public static String formatTimeInstant(Date aDateTime)
aDateTime
- the date with the date and time.
public static String formatTimeInstant(Calendar aDateTime, boolean includeFraction)
aDateTime
- the calendar with the date and time.includeFraction
- true to include the fractions of a second (.fff)
portion in the results, false to not.
public static String formatTimeInstant(Calendar aDateTime)
aDateTime
- the calendar with the date and time.
public static Date readTimeInstantAsDate(String aDateTime)
aDateTime
- the formatted string.
IllegalArgumentException
- on invalid string.public static Calendar readTimeInstant(String aDateTime)
aDateTime
- the formatted string.
IllegalArgumentException
- on invalid string.public static final Calendar convert(Calendar xmlCal)
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |