I'm looking for an easy way to parse a string that contains an ISO-8601 duration in Objective C. The result should be something usable like a NSTimeInterval
.
An example of an ISO-8601 duration: P1DT13H24M17S
, which means 1 day, 13 hours, 24 minutes and 17 seconds.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…