php - Find days difference between two dates with range of thousands of year -
how can find days difference in php dates may 1/1/1 1/1/1000000.
strtotime(), mktime(), date->diff() these function not helpful more limit of unix timestamp.
as far know, datetime allows dates in periods of time. before unix.
quite possibly fial on 1/1/10000000 needs testing.
to difference, use diff
$datetime1 = new datetime('2009-10-11'); $datetime2 = new datetime('2009-10-13'); $interval = $datetime1->diff($datetime2); echo $interval->format('%r%a days');
if diff doesn't work on ranges, try https://stackoverflow.com/a/676828/486780 .
Comments
Post a Comment