A library and webservice I am using, communicates time-intervals in ISO 8601: PnYnMnDTnHnMnS. I want to convert such formats to seconds. And vice versa. Seconds are a lot easier to calculate with.Example interval values are:
- PT1M or PT60S (1 minute)
- PT1H, PT60M or PT3600S (1 hour)