An example on how to parse ISO-8601 duration in string format and convert it to time.Duration type. However, this example doesn't parse M (month) because it cannot determine if the month is 29/30 or 31 days.

By Adam Ng

IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.