[whatwg] HTML5 Definition of week (section 188.8.131.52)
ian at hixie.ch
Sun Jul 19 03:45:51 PDT 2009
On Fri, 3 Jul 2009, SJ Kissane wrote:
> I am concerned by the wording of this section. There are different
> systems of week number -- as far as I can work out, this is the same as
> ISO 8601 week numbering. But it nowhere explicitly says that.
> I think, the spec should have a normative reference to ISO 8601 for the
> definition of week numbering. Then, if the spec wants to give an
> informative recap of what ISO 8601 says, for the benefit of those who
> don't have a copy (especially since it isn't free), that's fine. But I'm
> worried, by inserting some complicated definition into the spec, does it
> match exactly ISO 8601's definition? (I'm sure it does, but "are the
> definitions the same?" is not immediately obvious from inspection.)
They are not the same. ISO8601 doesn't define how you parse a week string,
how you handle errors in such a string, and so forth. The numbers are
compatible, and a valid HTML5 week string is an ISO8601 week string
(though I don't know if the opposite is the case), but that's about it.
While we could have an non-normative reference, in practice, it wouldn't
add much, since (a) the HTML5 spec defines everything you might get from
ISO8601, and (b) we don't want to have implementors think "oh, it's the
same as ISO8601, I'll just use an ISO8601 date library", since such a
library might get the parsing details wrong in terms of what HTML5 says.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg