[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [office-formula] WEEKNUM reference
Hi David, On Friday, 2007-02-23 18:22:15 -0500, David A. Wheeler wrote: > I said: > > > > > WEEKNUM(x;0) == WEEKNUM(x; WEEKDAY(DATE(1;1;YEAR(x))) > > Eike: > > They are dfferent simply because WEEKDAY(DATE(YEAR(x);1;1)) returns > > a number between 1 and 7. > > Well, sure, but the ANSWER should ALWAYS be the same. By definition. WEEKDAY(DATE(YEAR(x);1;1)) computes the day of the week on January 1 of the given year. If its result is sent in as the second parameter, the result should be the same as if I'd used "0" for the day. Ah, sure, yes, I was blind. 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]