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


Wheeler:
> > 1. Simple/absolute weeks
> > We can cover the "absolute/simple" week number system with a trivial modification to WEEKNUM.  Here's a proposal: if WEEKNUM's second parameter is "0", then the simple week number is returned.  That would mean that WEEKNUM(d;0) == WEEKNUM(x; WEEKDAY(DATE(1;1;YEAR(x))).

Eike:
> Apart from that it would be DATE(YEAR(x);1;1) instead, I don't see why
> WEEKNUM(d;0) would be equal to WEEKNUM(x;n) with n!=0.

Ooops, I changed the unbound variable midways through. Bad me!  Let me try again; what I meant was:
WEEKNUM(x;0) == WEEKNUM(x; WEEKDAY(DATE(1;1;YEAR(x)))


Eike:
> Actually quite a few locales not using ISO 8601 week numbering use
> minimum-number-of-days 1, resulting in the first week of the year being
> the week where the first start-of-week-day of that year is, which would
> be covered by your 1..7 proposal above.
> 
> Some, similar to ISO 8601, use minimum-number-of-days 4, but with Sunday
> as start-of-week-day. These would need extra handling. Currently the
> locales are *-CA Canada and *-MT Malta, according to the CLDR
> supplementalData.xml

Eek.  Okay, I stand corrected.

Okay, I think there's wide agreement that we need to _AT LEAST_ add support for 1..7 as the second parameter.

Should we add the optional 3rd parameter for "minimum number of days in a week??  Define "0" for simple years?

--- David A. Wheeler


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