Bob,

You're on the right track!

I would tackle this as follows:

1. Find what day the first sunday is using getdate(mktime(0,0,0,11,1)); 
(getdate returns an 
array and index "wday" is an int 0 - 6 for Sunday - Saturday)

2. Find how many days from 11/1 it is until the first Sunday. 

3. Add 7 days and you're at the second Sunday.

-Josh

--- In [email protected], "Bob" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I'm trying to calculate the 2nd Sun in Nov of the current year, using php 4.3
> 
> echo date('w', mktime(0,0,0,11,1));
> would give me (0 - 6 Sun to Sat) Nov 1st of current year
> Not sure whether I'm on the right track, starting this way?
> 
> Tried strtotime(); but maybe I was doing something wrong.
> Speed is not too important, as it's only called one.
> Any advice on how to tackle this?
> 
> Thanks, Bob.
>



Reply via email to