Hi all, I am having a problem with dates, in my code i use
$header1 = strtoupper(date("M-y", mktime(0,0,0, date("m"), 1, date("y")))); to get the current date i then proceed to add to it to get the next 12 months doing
$header2 = strtoupper(date("M-y", mktime(0,0,0, date("m")+1, date("y"))));
$header3 = strtoupper(date("M-y", mktime(0,0,0, date("m")+2, date("y"))));
$header4 = strtoupper(date("M-y", mktime(0,0,0, date("m")+3, date("y"))));
Today's date being april 30 2002, these variables would return MAY-03, JUNE-03, and JULY-03 respectively. My problem is when I get to
$header11 = strtoupper(date("M-y", mktime(0,0,0, date("m")+10, date("y")))); This returns MAR-03 instead of FEB-03 like it is supposed to. All the rest of my months come up fine except for this one. I have tried all kinds of combinations to try to come up with FEB-03 but always come up with MAR-03. Does anyone know why this is happening? I think it may have something to do with the fact that february is the only month with less than 30days. However even if this is the case I haven't been able to come up with a fix for this. Does anyone have any ideas?