Re: Number of days between two dates

From: Date: Tue, 10 Jun 2003 19:35:13 +0000
Subject: Re: Number of days between two dates
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-150960@lists.php.net to get a copy of this message
On Wednesday 11 June 2003 02:52, LeTortorec, Jean-Louis wrote: > Do you know how to calculate the number of days between 2 dates? > > So far, I used that function: > > $a=mktime("","","",$month1, $day1, $year1); > $b=mktime("","","",$month2, $day2, $year2); > $c=($a-$b)/(60*60*24); > > The problem is one date is prior to 01/01/1970, the mktime function does > not work. Have a look at the Calendar functions. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* No man would listen to you talk if he didn't know it was his turn next. -- E.W. Howe */

« previous php.general (#150960) next »