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

week number rules depend on locale #886

Closed
aphillips opened this issue May 12, 2017 · 10 comments
Closed

week number rules depend on locale #886

aphillips opened this issue May 12, 2017 · 10 comments
Assignees
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. time

Comments

@aphillips
Copy link

w3c/i18n-activity#402

http://w3c.github.io/sdw/time/#time:week

This says in part:

Weeks are numbered differently depending on the calendar in use.

According to ISO-8601 the first week of the year shall include at least four days. Since Monday is defined as the first day of the week, in practice the first week of the year is the one containing the first Thursday in the year.

Week number rules are not just dependent on the calendar in use, but depends on locale (that is, they are culturally linked). ISO-8601 is a standard, but not every locale counts the first week as the first Thursday container, even using Gregorian calendar.

@r12a r12a added the i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. label May 13, 2017
@tidoust tidoust added the time label May 13, 2017
@dr-shorthair
Copy link
Collaborator

dr-shorthair commented May 15, 2017

I've slightly modified the first sentence to indicate the locale dependence.

Weeks are numbered differently depending on the calendar in use, and locale.

Regarding the second one: we already received a comment #726 requesting that we add the explanation of the ISO 8601 definition, which is what you see now. If that is incorrect then we may have conflicting requests, and I'm not sure how to reconcile them. Do you have a suggestion about the appropriate wording?

@dr-shorthair
Copy link
Collaborator

How about this:

Weeks are numbered differently depending on the calendar in use, and locale.
ISO-8601 specifies that the first week of the year shall include at least four days. Hence, in a locale where Monday is the first day of the week, week 1 contains the first Thursday in the year.

@chris-little
Copy link
Contributor

I agree with the new wording. The only other concern is that this ISO text is stable and will not, and has not, changed over the years.

@aphillips
Copy link
Author

That wording isn't necessarily correct though.

For starters, some cultures/locales count Sunday as the first day of the week (en-US is one of these). Some locales count Monday as the first day of the week (en-GB is one of these).

The week counting rule for a given locale depends on (somewhat more idiosyncratic) cultural norms. ISO8601 has picked one of these (@chris-little: long ago and have never and are unlikely ever to change it) to form the week numbering in that standard. They chose the "first Thursday" method because it is fairly common.

However, there are a number of locales that use "the week that the 1st falls in", regardless of the day of the week. So I'd suggest:

Weeks are numbered differently depending on the calendar in use and the local language or cultural conventions (locale). ISO-8601 specifies that the first week of the year includes at least four days. In that system, the first week of the year is the one that contains the first Thursday in the year.

Note that I don't make mention of other systems.

@dr-shorthair
Copy link
Collaborator

dr-shorthair commented May 16, 2017

Perhaps I misunderstood: what does ISO 8601 actually specify?
(i) that the first week of the year must include at least 4 days (yes)
(ii) that the first day of the week is Monday (??)

If both are true, then I think my original wording was correct (though perhaps some more options than 8601 should be canvassed);
If only (i) is true then I think my revised wording is correct.

@aphillips the first sentence in your proposed text is implicit (or at least not forbidden) by the last sentence in my version. Can you please tease out for me what is needed as a consequence of ISO 8601 and what is conventional and locale specific.

@aphillips
Copy link
Author

The problem is not what ISO 8601 specifies but rather your spec's intentions. If you are trying to model the way that different cultures or locales do week counting, then the problem is that some week counting systems do not count weeks the way that ISO 8601 does. For example, many of them count the week that has the 1st day of the year in it (regardless of whether that week has a Thursday inside the year too).

When one is using ISO 8601, the first week is the one that contains the first Thursday. It doesn't matter what the first day of the week is in that case.

If you want your spec to allow for the other common counting scheme (and my desktop copy of ICU reports 107 locales out of 160 are like this), then my health warning is more correct. Does that explain?

@dr-shorthair
Copy link
Collaborator

The 2006 version of OWL-Time was over-simplified, but has been widely used so we are attempting to provide backward compatibility.
The main intention of this revision is to accommodate the variability that is actually out there in the wild. However, our judgement was that it is futile to prescribe exactly how to do it, because timezones and calendars are a complex issue without any central authorizing body precisely because of locale and conventional usage. I think you are providing supporting evidence!

So the challenge is to get the wording right (though the ontology implementation is probably fine, since it merely requires URIs in strategic places).

Will use your wording. Thanks.

@dr-shorthair
Copy link
Collaborator

dr-shorthair commented May 16, 2017

BTW - does ISO 8601 specify Monday as first day of week? Your wording appears to require that.

@dr-shorthair
Copy link
Collaborator

Have used a slightly modified version of your text here http://w3c.github.io/sdw/time/#time:week
OK now @aphillips ?

@aphillips
Copy link
Author

Looks good to me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. time
Projects
None yet
Development

No branches or pull requests

5 participants