try $asctime(m) and then if out the numbers to save keystrokes
also declare a local varible and resolve $asctime(m) only once
also use else if statements and a final else then to reduce 'load'
this snippet inspired me to create a $season identifier
at http://www.hawkee.com/snippet/6558/