var ampm = hour <= 11 ? 'am' : 'pm';