I hate working with dates - easy, but i can't figure it out
Posted: Fri Mar 19, 2004 5:12 am
I need to get the last day of the previous months e.g 30 or 31
i now how to get the last day of the current month like this...
so, i though i would be able to minus 1 from the $search_month, like this ...
...but, if the current month in January (month 1) and you minus 1, the month now becomes 0, and the above code doesn't return anything!?
Help
Mark
i now how to get the last day of the current month like this...
Code: Select all
$lastday = mktime(0, 0, 0, $search_month-1, 0, $nowArray['year']);Code: Select all
$lastday = mktime(0, 0, 0, ($search_month-1), 0, $nowArray['year']);Help
Mark