Have you guys ran into this? I'm using strtotime('first monday january 2007'), but I'm getting erroneous dates when the first day of that week occurs on the first of the month.

Examples:
date('Y-m-d', strtotime('second monday january 2007'));
date('Y-m-d', strtotime('second tuesday february 2007'));

Output Expected:
2007-01-08
2007-02-08

Actual Output:
2007-01-15
2007-02-15

The bug is in the PHP bug tracker here:
http://bugs.php.net/40003

But, alas, the bug has been marked as "bogus", although the problem is apparently unresolved. Is there a workaround for this, or am I doing something wrong?

Thanks guys!
- Brian
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to