cf.TimeDuration.iso

TimeDuration.iso

Return the time duration as an ISO 8601 time duration string.

New in version 1.0.

Examples:
>>> cf.TimeDuration(45, 'days').iso
'P45D'
>>> cf.TimeDuration(5, 'seconds').iso
'PT5S'
>>> cf.TimeDuration(10, 'calendar_years').iso
'P10Y'
>>> cf.TimeDuration(18, 'calendar_months').iso
'P18M'

This Page