Hi Folks,
I am trying to get the day of month for a particular day of week (e.g.
Tuesday) for the first, second, third, fourth week in a month. The code i
have seems issues in March, but works e.g. in April:
print date("d-m-Y H:i:s",strtotime('1 March 2011 Tuesday'));
>> 01-03-2011 00:00:00
prin
x27;March 2011 third
Tuesday'))."\n";
print "fourth: ".date("d-m-Y H:i:s",strtotime('March 2011 fourth
Tuesday'))."\n";
first Tuesday :01-03-2011 00:00:00
first: 08-03-2011 00:00:00
second: 15-03-2011 00:00:00
third: 22-03-2011 00:00:00
gt; print "second: ".date("d-m-Y H:i:s",strtotime('second Tuesday of March
> 2011'))."\n";
> print "third: ".date("d-m-Y H:i:s",strtotime('third Tuesday of March
> 2011'))."\n";
> print "fourth: &
3 matches
Mail list logo