in reply to Given month last day
A bit obscure
$t->add_months(11-$t->mon)->month_last_day; [download]
clearer
use Date::Calc qw( Days_in_Month ); print Days_in_Month(2016,2); [download]