anon...@coward.org writes:
> > 2012-01-01 is 2011-W52-7 - the seventh day of a Mon-Sun ISO 8601 week.
> > and the year number of such a week is determined by its Thursday.
>
> I appreciate the explanation.
>
> While it's good to have standards, bizarre results like this are not
> very useful, and cause for confusion.
That's a function of our calendar. It's a big hairy ball of compromises
between our bizarre intuitions and conventions and the bizarre real
world, so there will always be confusion in some cases.
> I don't have much choice anyway.. the API I'm calling seems to be
> taking day 1 of a year to be the start of the first week of the year,
> which is intuitive.
So you'll get weeks with fewer than seven days, which seems bizarre and
cause for confusion.
And you'll get weeks starting on different days of the week depending on
which date you ask about, which seems bizarre and cause for confusion.
Rather than making up your own, you might want to investigate whether
the API is using a different standard for week numbering
<URL:
https://en.wikipedia.org/wiki/Seven-day_week#Week_numbering>.
--
\ “When we call others dogmatic, what we really object to is |
`\ their holding dogmas that are different from our own.” —Charles |
_o__) Issawi |
Ben Finney