Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit for duration #27

Open
HadrienGardeur opened this issue Jul 25, 2016 · 7 comments
Open

Unit for duration #27

HadrienGardeur opened this issue Jul 25, 2016 · 7 comments

Comments

@HadrienGardeur
Copy link
Collaborator

While a previous version of the specification used SMIL clock for this value, the current version is based on seconds.

Should we keep it in seconds or use ISO8601 duration for example?

video/audio in HTML5 use seconds, and duration in Media RSS too.

@HadrienGardeur
Copy link
Collaborator Author

schema.org uses ISO 8601 for duration: http://schema.org/duration

Since we'll use that element in metadata, we might as well align and use ISO 8601 in the link object.

@dauwhe
Copy link
Owner

dauwhe commented Aug 12, 2016

I'd want to know some history, and also try to avoid divergence from the EPUB media overlays spec where possible. Why are SMIL clock values different from ISO 8601 durations? I'd also note that SMIL clock values seem more human-readable than ISO 8601 durations.

@HadrienGardeur
Copy link
Collaborator Author

ISO 8601 is pretty much universally used (along with RFC 3339, which is a profile of ISO 8601) for time and date.

I don't know why SMIL clock values are not based on ISO 8601, but since duration in schema.org is based on ISO 8601 I would rather avoid a situation where we use multiple standards to express a duration.

@iherman
Copy link

iherman commented Aug 12, 2016

I do not know why SMIL went on a different path either. I tried to look at the SMIL spec but did not see any argumentation. (Or did not find it; the SMIL spec is HUGE.)

B.t.w., xsd:schema datatypes also rely on ISO 8601 and, as a consequence, so does RDF (which refers to xsd:schema).

That being said, it is a bit of a pain in the back side for duration. A 5 second duration seems to be PT5S in ISO 8601, as opposed to 5s in SMIL. If we need a general duration type with all its intricacies, than 8601 makes sense (and I would add: "alas!") but if we only want to express seconds then ISO8601 seems to be an overkill.

As an aside, I have an instinctive negative reaction to rely on a standard whose page says:

How can I get ISO 8601?

You can buy the full standard from the ISO Store, or from the ISO member in your country.

but we can also rely on xsd:schema, which is free of charge. But that is clearly the W3C person talking:-)

@HadrienGardeur
Copy link
Collaborator Author

A 5 seconds duration should be just 5S in ISO 8601, I don't think that the PT part is necessary.

@iherman
Copy link

iherman commented Aug 12, 2016

This is where it backfires that I have no access to the standard itself. If I look at

https://en.wikipedia.org/wiki/ISO_8601#Durations

that text suggests that the PT is necessary. I would be happy to be proven the contrary.

B.t.w.: https://xkcd.com/1179/ :-)

@HadrienGardeur
Copy link
Collaborator Author

Yeah that sucks, I've seen examples for both PT5S and 5S...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants