help with script

shell: sh
system: SCO unix 5.05 (openserver)

I have a script that tests the date then downloads a specific file based on the date via ftp.

My problem is that 0's in the date get dropped. ie january 01 would become 1

Date code came from: http://unix.about.com/library/weekly/aa070901a.htm

Part of my script

month=`date +%m`
day=`date +%d`
year=`date +%Y`
month=`expr $month + 0`
day=`expr $day - 1`
if [ $day -eq 0 ]; then
  month=`expr $month - 1`
  if [ $month -eq 0 ]; then
    month=12
    day=31
    year=`expr $year - 1`
  else
    case $month in
     1|3|5|7|8|10|12) day=31;;
      4|6|9|11) day=30;;
      2)
        if [ `expr $year % 4` -eq 0 ]; then
          if [ `expr $year % 400` -eq 0 ]; then
            day=29
          elif [ `expr $year % 100` -eq 0 ]; then
            day=28
          else
            day=29
          fi
        else
          day=28
        fi
      ;;
      ;;
   esac
  fi
fi

Ftp stuff goes here

To download the file i need January to = 01 and not 1. I can make 18 if statements to change 1-9 for $day and $month to place a 0 in front of them, but there has got to be a better way.

Can anyone help with this?

Thank you

Subject lines like "Help with script" aren't very helpful to others who may want a similar solution. Something like "Number formatting" or "Date formatting" would land others nearer the mark.

A few solutions come to mind:

if [ `expr $month : '.*'` -lt 2 ] ; then month=0$month; fi
Most folks overlook the RE capability of expr.

This is a bit simpler, and it takes advantage of the idea that $month is both string and number.
if [ $month -lt 10 ] ; then month=0$month; fi

If your system has a printf command, this is even simpler (though it does make a new process that the previous solution didn't):
month=`printf '%02d' $month`

Thanks for the help, I'll make my topics more descriptive in the future.