OpenForm

Duration

Last updated on

A time period in ISO 8601 format

A Duration is a string primitive that represents a time period expressed as an ISO 8601 duration string.

Format

A duration is a string following the ISO 8601 duration format:

P[n]Y[n]M[n]DT[n]H[n]M[n]S
ComponentDescription
PDuration designator (required prefix)
[n]YNumber of years
[n]MNumber of months
[n]DNumber of days
TTime designator (separates date and time)
[n]HNumber of hours
[n]MNumber of minutes
[n]SNumber of seconds

Examples

# One year duration
duration: P1Y

# Thirty minutes
timeout: PT30M

On this page