my ($year, $month, $day) = split /-/, $maxdate;