Function problem

I have a function that checks the date and if the date matches the currentdate then its going to include a htm file if it doesnt then include the default htm file.
Seems to only wokr for the default.


function getCandle(){
$month = date(m);
$day = date(d);
$currentDate = $month.$day; 
 if(currentDate==1221)
 {
  include("1.htm");
 }
 else if(currentDate==1222)
 {
  include("2.htm");
 }else if(currentDate==1223)
 {
  include("3.htm");
 }else if(currentDate==1224)
 {
  include("4.htm");
 }else if(currentDate==1225)
 {
  include("5.htm");
 }else if(currentDate==1226)
 {
  include("6.htm");
 }else if(currentDate==1227)
 {
  include("7.htm");
 }else if(currentDate==1228)
 {
  include("8.htm");
 }else
 {
  include("default.htm");
 }
}

if it works off of the server clock wich in my case i guess would be localhost, current date shows todays date but the conditional doest reconize it.

any one have any ideas whats up with this?