{
"kind": "youtube#videoListResponse",
"etag": "\"XlbeM5oNbUofJuiuGi6IkumnZR8/ny1S4th-ku477VARrY_U4tIqcTw\"",
"items": [
{
"id": "9bZkp7q19f0",
"kind": "youtube#video",
"etag": "\"XlbeM5oNbUofJuiuGi6IkumnZR8/HN8ILnw-DBXyCcTsc7JG0z51BGg\"",
"contentDetails": {
"duration": "PT4M13S",
"dimension": "2d",
"definition": "hd",
"caption": "false",
"licensedContent": true,
"regionRestriction": {
"blocked": [
"DE"
]
}
}
}
]
}
Youtube API v3 provides its video durations in this format "duration": "PT4M13S"
Is this a standard time format? I'm trying to get a user friendly format using Objective-C. I would like to know if this is a Objective-C DateTime class supported format. If not what are those P,T, charactors stands for?
That is an ISO 8601 time format. PT
indicates that we are dealing with a time peroid. H
, M
, S
and similar ones are obviously the duration in hours, minutes and seconds, etc. I am not sure if Objective-C is able to handle this natively, but you may be able to find something useful knowing how it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With