I've seen plenty of conversions of the ISO 8601 timestamp in other languages but not come across one for Swift.
I'm looking to convert the typical response from the Youtube API:
let timestamp = "PT3M53S"
To a total number of seconds....
seconds: Int = 233
Any clues on how to do this, I am torn whether to split the expression up, looking for the number between "M" and "S" to equate to seconds.
Please also consider the expression could include Hours e.g.
let timestamp = "PT1H3M53S"