|
Posted by larry on 12/06/06 04:30
Of course I thought it over and came up with better examples:
$mn = date("m");
$yr = date("Y");
$dy = date("d");
$numdays = date("t",mktime(0,0,0,$mn,1,$yr));
$nextmonth1 = date("m/d/Y",mktime(0,0,0,$mn,$dy+30,$yr));
$nextmonth2 = date("m/d/Y",mktime(0,0,0,$mn+1,$dy,$yr));
Mktime can take 0, negative and positive vlaues beyond the day and
month limits and interpret them; if you put $dy+240 it will calculate
the date 240 days in advance of the date, etc.
Check on the parameters of the date() function there is some goodies in
there on what it can output.
Larry
Navigation:
[Reply to this message]
|