This is August.
date("m") is '08' You are comparing it with a later month '12' (December) .
'12' > '08' and it returns False, which is not what you want.
Edit:
TO DEBUG:
Your function was giving a bad result.
Add debug code to find out which test was failing improperly.
Once you...