Number of days between two dates
| From: | LeTortorec, Jean-Louis | Date: | Tue, 10 Jun 2003 18:52:33 +0000 |
| Subject: | Number of days between two dates | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-150952@lists.php.net to get a copy of this message | ||
Hello everyone,
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.
Any idea?
Thanks.
Jean-Louis