0

How Can we find difference between two older Gregorian dates(from 1000 to 3000 years),I tried bellow method

$diff = abs(strtotime($date2) - strtotime($date1));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
printf("%d years, %d months, %d days\n", $years, $months, $days);

but that works only within 1970-2038,How can I handle older dates (from year 1000) using PHP? please give me any suggestion??

(Note:I have go through method which is already given in stackoverflow, It only allow me to format dates but I can't find difference between two dates )

0 Answers0