Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right, I figured something like this had to be in play. But by whom and where is this US week numbering system actually defined?

I can see it is probably implemented in Java by java.time.temporal.WeekFields#SUNDAY_START, but there is no reference to any standard that actually defines it in the documentation. Just this (oddly worded) claim: "This week definition is in use in the US and other European countries."



> But by whom and where is this US week numbering system actually defined?

I don't think there is any formal definition, it's just customary. AFAIK americans don't really use week numbering so it's not really a thing. OTOH ISO defines a very strict week-based calendaring system.

Anyway SUNDAY_START defines that weeks start on sunday and the first week-of-year needs only contain a single day, so I expect you can never get the "overlapping" information from the JDK, it just considers that W01 is whichever week contains 01-01 and forgets about the overlapping last week of the previous year, if any.


So, we have the en-US locale returning arbitrary week numbers in a system that is not really well-defined or even used by anybody - in lieu of using the one and only standardized week numbering system. If a person asks a computer for a "week number 23 of 2021", the only sensible solution in any culture I think would be to use the ISO system. Only locale dependent thing should be on which "ISO week number" the Sunday falls.

My point is the "customary US system" seems to actually have nothing to do with week numbering - or has anyone actually heard someone say "23rd week of 2021" or such? This system seems to only make sense when talking about ordinal weeks in and around the New Year, meaning terms like "first week of 2021", "second week of 2021" or "last week of 2020". But those are ambiguous, even in cultures that use ISO weeks.

In my country ISO weeks are used extensively in business, but if you were talking about "first week of 2021" (ordinal), I would think you're talking about the week on which January 1 falls - same as the "US customary" system. But if you said "week 1 of 2021" (cardinal) I would understand immediately it as the ISO week 1 of 2021, which I know from experience is not always the same as "first week of 2021".


My experience in the US is that week numbering is used principally by finance to keep track of weekly operations, which is usually only payroll. So it makes perfect sense to me that the week containing Jan. 1 should always be week 1 - in fact otherwise is rather unintuitive. This results in some confusion around the new year but this is kind of an intrinsic problem with weekly payroll and is one of the reasons that payroll closing tends to be a specific and somewhat complex process, as the year totals are calculated more or less independently from the pay schedule.

Outside of payroll, I have seen very little use of week numbers for any purpose in the US. Far more common to write "the week of Jan. 18" where the date given is typically, but not always, the Sunday or Monday in that week. Week numbers are not displayed on most calendars to most people would be pretty frustrated if you told them a week number.


> If a person asks a computer for a "week number 23 of 2021", the only sensible solution in any culture I think would be to use the ISO system.

No, because it wouldn't match american the expectations of people not using ISO calendars, despite and regardless of weeknumbers not being routinely used by them.

It is an argument that maybe weeknumbers should not be a thing / available in all locales, but not that they should be renumbered to match an other locale, regardless of that other locale making more sense.


But ... haven't we established that the en-US locale week numbering system is not really based on anything sensible. So how the user can have any sensible expectation of what they get as a reply when they ask for a week number?

I tried to research the glibc version control history of how it came to be like this. I think it's completely arbitrary, and at times en-US did use ISO 8601 weeks.


Especially since, if week numbering isn't common in the US, you might only be looking it up when you're trying to collaborate with someone in Europe!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: