public class ICEDurationFormat extends Object
When a period of time needs to be specified, the ICE Duration format is: PnS (or Pn,nS for sub-second granularity) where the "P" (upper case letter P) is a literal character ([ISO8601] designator), "n" is an arbitrarily large integer value, and "S" (upper case letter S) is a literal character. This format denotes a number of seconds (and an optional fractional second part).
Copyright 2004 SAP AG
| Constructor and Description |
|---|
ICEDurationFormat() |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(long milliSeconds)
Formats the specified amount of milliseconds as a string adhering to the
ICE Duration Format.
|
static long |
parse(String str)
Parses the specified string (which must be in ICE Duration Format) and
returns the amount of milliseconds it represents.
|
public static String format(long milliSeconds)
Note, that the sub-second format will be used only when neccessary. For example, 30000 ms will be returned as "P30S", but 30500 ms as "P30,500S".
milliSeconds - the amount of milliseconds to be formattedpublic static long parse(String str) throws ParseException
str - the string to be parsedParseException - Description of the ExceptionParseException - 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