How can I get the last day of the month in PHP?
Given:
$a_date = \"2009-11-23\"
I want 2009-11-30; and given
$a_dat
Nowadays DateTime does this quite conveniently if you have month and year you can
$date = new DateTime('last day of '.$year.'-'.$month);
From another DateTime object that would be
$date = new DateTime('last day of '.$otherdate->format('Y-m'));