parseDurationNanos
parseDurationNanos
converts a string representing a Duration to nanoseconds.
Syntax
parseDurationNanos(s)
Parameters
Parameter | Type | Description |
---|---|---|
s | string | The string to be converted. Time duration strings can be formatted as |
Returns
Nanoseconds representation of the time string.
Examples
one_day_nanos = parseDurationNanos("P1D")
one_hour_nanos = parseDurationNanos("PT1H")
println one_day_nanos
println one_hour_nanos
- Log