On Mar 11, 2012, at 3:10 PM, Matijn Woudt wrote: > On Sun, Mar 11, 2012 at 7:33 PM, Tedd Sperling <tedd.sperling@xxxxxxxxx> wrote: >> Actually, this works for me: >> >> $days_in_month = date('t', mktime(0, 0, 0, $next_month, 0, $year)); >> >> But again, I don't see why I have to use "next month" to find the number of days in this month. > > That's because you're requesting day 0 of some month, which refers to > the last day in the previous month. > Try: $days_in_month = date('t', mktime(0, 0, 0, $next_month, 1, $year)); > > - Matijn I got that. Beating the same dead horse again, I think day 0 of this month should contain the days in this month, but I am in the minority on this. Cheers, tedd _____________________ tedd.sperling@xxxxxxxxx http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php