OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office-formula] WEEKNUM reference


Hi David,

On Thursday, 2007-02-15 12:54:56 -0500, David A. Wheeler wrote:

> I don't think there's a single name for this system. Indeed, there are _set_ of such systems, depending on what day your weeks begin at.  It is NOT limited to the US.  This has some useful info:
> http://en.wikipedia.org/wiki/Week#Week_number

Well, how much should I trust a page that for the first method (first
day of week Monday, first week of year contains Jan-1 and 1st Sunday)
states used in "Most of Europe and UK" whereas most of European
countries use ISO 8601 instead (actually European Norm EN 28601, being
essentially the same) and UK can't make up its mind..

> I propose that we call this the "traditional week number". It simply declares that January 1 is the first day of the first week, and increments on the next beginning of the week (controlled by the second parameter).

Something like that.

> Indeed, the Excel formula only allows Sunday and Monday, but it appears that in many Islamic countries the day begins on Saturday.  I believe we should extend that parameter to include ANY day, particularly Saturday, to handle everyone.  That would really improve internationalization.

Actually that's not enough. To determine the correct week number you
need the first day of the week, and the minimal amount of days of a week
there must be from Jan-1 on to number the week #1. Hence for ISO 8601
first day of week Monday and at least 4 days of the week from Jan-1 on,
resulting in rules like "first Thursday in year is week #1".
Theoretically 49 combinations, practically used only a few.

> Eike: Would you please make those changes?

Apart from that only the first day of week wouldn't be enough,
I hesitate to make such changes in a function that is provided to be
Excel compatible.

  Eike

-- 
Automatic string conversions considered dangerous. They are the GOTO statements
of spreadsheets.  --Robert Weir on the OpenDocument formula subcommittee's list.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]