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


Eike Rathke:
> I still don't see how that's meant. Maybe a misunderstanding from mixing
> absolute and simple weeks. From my understanding the definitions are:
> 
> 1. Absolute week, as used by US military:
>    The first 7 days of a year are the first week, regardless of the
>    day-of-week the year started with, days 8-14 are the second week, and
>    so on. This would be covered with a 2nd argument of 0.
> 
> 2. Simple weeks, as used in many countries not following ISO 8601 and
>    implemented by Excel:
>    Week 1 always is the week containing January 1, week number changes
>    to week 2 as soon as the start-day-of-week is reached. Remaining days
>    of the first week in the previous year are always in week 53
>    respectively 54 of that year.

Yes, I completely agree with that entire description, both cases.  I was trying to restate case 1 as a definition; I _believe_ that case 1 is described by this relationship:
> > WEEKNUM(x;0) == WEEKNUM(x; WEEKDAY(DATE(1;1;YEAR(x)))
if "case 1" and the relationship aren't the same, I don't know why (it'd be worth clarifying if they ARE different, that might reveal something important).

> > Should we add the optional 3rd parameter for "minimum number of days in a week??
> 
> Yes, we should, so we can support 

Okay, I'm fine with that.

> My concern wasn't about how to write a new or incompatibly changed Excel function to ODFF, but how to write the WEEKNUM as we defined it to Excel instead. An app that wants to export the WEEKNUM function so far can rest assured that if the calculation uses modes Excel doesn't know then Excel will generate an error. If that changes, defining an additional WEEKNUM_E later doesn't help.

Ah.  Not sure how to handle that case, other than what was said earlier. Suggestions?

--- David A. Wheeler


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