Categories
Development

Last day of the month

Here’s one line of code to get the last day of a month:

$last_day = date(‘t’, mktime(0, 0, 1, $month_variable, 1, $year_variable));

How much more difficult do you want it to be ???