if ($month + 0 == 7) { ... # Or, better would be ... @month_names = ( '', 'January', ... ); $monthStamp = $month_names[$month];