public class ISO8601DateFormat
extends java.lang.Object
sYYYY-MM-DDThh:mm:ss.sssTZDwhere:
Constructor and Description |
---|
ISO8601DateFormat() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(java.util.Date isoDate)
Format date into ISO format
|
static boolean |
isTimeComponentDefined(java.lang.String isoDate)
Checks whether or not the given ISO8601-formatted date-string contains a time-component
instead of only the actual date.
|
static java.util.Date |
parse(java.lang.String isoDate)
Parse date from ISO formatted string.
|
static java.util.Date |
parse(java.lang.String isoDate,
java.util.TimeZone timezone)
Parse date from ISO formatted string, with an
explicit timezone specified
|
static java.util.Date |
parseDayOnly(java.lang.String isoDate,
java.util.TimeZone timezone)
Parses the given ISO8601-formatted date-string, not taking into account the time-component.
|
static java.util.Date |
parseInternal(java.lang.String isoDate,
java.util.TimeZone timezone)
Parse date from ISO formatted string, either in the specified
TimeZone, or with TimeZone information taken from the date
|
public static java.lang.String format(java.util.Date isoDate)
isoDate
- the date to formatpublic static java.util.Date parse(java.lang.String isoDate)
isoDate
- ISO string to parseAlfrescoRuntimeException
- if the parse failedpublic static java.util.Date parse(java.lang.String isoDate, java.util.TimeZone timezone)
isoDate
- ISO string to parsetimezone
- The TimeZone the date is inAlfrescoRuntimeException
- if the parse failedpublic static java.util.Date parseInternal(java.lang.String isoDate, java.util.TimeZone timezone)
isoDate
- ISO string to parseAlfrescoRuntimeException
- if the parse failedpublic static boolean isTimeComponentDefined(java.lang.String isoDate)
isoDate
- public static java.util.Date parseDayOnly(java.lang.String isoDate, java.util.TimeZone timezone)
isoDate
- the day (formatted sYYYY-MM-DD) or a full date (sYYYY-MM-DDThh:mm:ss.sssTZD)timeZone
- the timezone to useAlfrescoRuntimeException
- if the parsing failed.Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.