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

Comments

@aphillips
Copy link

@aphillips aphillips commented May 12, 2017

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.

@dr-shorthair

This comment has been minimized.

Copy link
Contributor

@dr-shorthair 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

This comment has been minimized.

Copy link
Contributor

@dr-shorthair dr-shorthair commented May 16, 2017

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

This comment has been minimized.

Copy link
Contributor

@chris-little chris-little commented May 16, 2017

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

This comment has been minimized.

Copy link
Author

@aphillips aphillips commented May 16, 2017

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

This comment has been minimized.

Copy link
Contributor

@dr-shorthair 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

This comment has been minimized.

Copy link
Author

@aphillips aphillips commented May 16, 2017

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

This comment has been minimized.

Copy link
Contributor

@dr-shorthair dr-shorthair commented May 16, 2017

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

This comment has been minimized.

Copy link
Contributor

@dr-shorthair 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

This comment has been minimized.

Copy link
Contributor

@dr-shorthair dr-shorthair commented May 17, 2017

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

@aphillips

This comment has been minimized.

Copy link
Author

@aphillips aphillips commented May 19, 2017

Looks good to me. Thanks!

@aphillips aphillips closed this May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.