The Youtube V3 API uses ISO8601 time format to describe the duration of videos. Something likes \"PT1M13S\". And now I want to convert the string to the number of seconds (for
Solution in Java 8:
Duration.parse(duration).getSeconds()