Next in thread → Next in month →

Re: [office-formula] WEEKNUM reference

From
Eike Rathke <>
Date
2007-02-27T12:27:29+00:00
ID
Thread
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.
Next in thread → Next in month →