parsePeriod
The parsePeriod
method returns the string argument as a Period, which is a unit of time in terms of calendar time (days, weeks, months, years).
Syntax
parsePeriod(s)
Parameters
Parameter | Type | Description |
---|---|---|
s | string | The string to be converted. Date-time strings are formatted according to the ISO-8601 duration format as Examples:
|
Returns
A Period.
Examples
period = parsePeriod("P33Y4M23D")
println period
- Log