Don't be so hard on yourself. A simple test improves the script.
$present_month - 1; if ( $present_month == 0 ) { $present_month = 12; }
Now, if the OP needs other features of the referenced modules, then that's great, but if all he needs is your script, that's great also.
Regards...Ed
"Well done is better than well said." - Benjamin Franklin
In reply to Re^2: get previous month in two digit number
by flexvault
in thread get previous month in two digit number
by Jim Wang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |