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
Time is already formatted, so it seems just replacing will be enough.
private String stringForTime(String ytFormattedTime) { return ytFormattedTime .replace("PT","") .replace("H",":") .replace("M",":") .replace("S",""); }