|
Posted by Steve on 12/05/06 16:08
<wesley@ispace.co.za> wrote in message
news:1165327854.453492.250300@f1g2000cwa.googlegroups.com...
| Hi
|
| I have searched through the archives but did not find a solution to
| this. Is there a way to get the last day of the month. In other words,
| can you determine the last date of the current month without having to
| check the Month and leap year to confirm?
|
| Is there also a way to determine the date, one month from now without
| actually checking the date and the Leap year?
|
$lastOfMonth = date(
'm/d/Y',
strtotime(
'-1 second',
strtotime(
'+1 month',
strtotime(
date('m') .
'/01/' .
date('Y') .
' 00:00:00'
)
)
)
);
echo '<pre>' . $lastOfMonth . '</pre>';
Navigation:
[Reply to this message]
|