[thelist] calculating a date

Joxn joxn at vernum.com
Mon Oct 16 12:41:46 CDT 2000


Hi everybody,
just wanted to share the way I solved my date-calculating problem in
PHP.

function CalculateDate($uDay, $uMonth, $uYear, $uNumberOfDaysToAdd)
{
  $FinalDate = date("d.m.Y", mktime(0,0,0,$uMonth, 
		  $uDay+$uNumberOfDaysToAdd, 
		  $uYear));
  return $FinalDate;
}

I found this the easiest way to add a certain number of days to a given
date.
And it also seems to work. :)

bye Joxn
-- 
   || //\\ \\// |\\||  ::  joxn at vernum.com  ::
 \\|| \\// //\\ ||\\|  ::      8053703      ::




More information about the thelist mailing list