public class ICEDateFormat extends Object
The format for a date string in ICE Date Format is: CCYY-MM-DD where CCYY is the four digit year (century and year, as described in [ISO8601]), MM is a two digit month number, DD is the two digit ordinal number of the day within the calendar month, and the separator character is a "-" (hyphen).
Copyright 2004 SAP AG
| Constructor and Description |
|---|
ICEDateFormat() |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(Date date)
Formats the specified
java.util.Date object as a string
adhering to the ICE Date Format. |
static Date |
parse(String str)
Parses the specified string (which must be in ICE Date Format) and
returns it as a
java.util.Date object. |
public static String format(Date date)
java.util.Date object as a string
adhering to the ICE Date Format.
Note, that the date will be converted to UTC (if not already in UTC) prior
formatting it to the ICE Date format. This is done although the time
contained in the java.util.Date object is not included in
the final string.
For example, the date July 1st 2002 01:00:00 AM (GMT+2) will be converted
to June 30th 2002 11:00:00 PM (UTC) and returned as "2002-06-30".
date - the date to be formattedpublic static Date parse(String str) throws ParseException
java.util.Date object. Note, as the string does not contain a time, a value of 00:00:00 AM (UTC) will be assumed before converting the resulting date to local time. For example, on a machine with local timezone GMT+2, the string "2002-06-30" will be interpreted as June 30th 2002 00:00:00 AM (UTC) and converted to June 30th 2002 02:00:00 AM (GMT+2).
To conclude, this method is NOT the exact inverse of the method
format.
str - the string to be parsedjava.util.Date object
containing the parsed dateParseException - when specifying an illegally formatted string| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice