hello,
i just realized php's date subtract isn't as powerful as i thought. mysql for example can smartly subtract dates. january 5th,2006- 6days= dec 30,2005. [SELECT DATE_SUB('2006-01-05', INTERVAL 6 DAY);]
but in php, it will be dec 31, 2006... at least when you do this for finding out the previous month or next one, so you have to set up a check like so...
if($month == 1)
$previous_link = mktime(0,0,0,12,1,($year -1));
else
$previous_link = mktime(0,0,0,($month -1),1,$year);
if($month == 12)
$next_link = mktime(0,0,0,1,1,($year + 1));
else
$next_link = mktime(0,0,0,($month +1),1,$year);
Now i would like to do subtract individual days, and with leap years mixed in, i am not sure how php can be smart about it? is there a function that subtracts day intervals and not just componants of the date (like above)?