Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function converttoHYD($date){
$start = strtotime('1970-01-00 00:00:00');
$current = strtotime($date);
$delta = ($current-$start); //delta in seconds
//calculate number of days
$days = $delta/(60*24);
return floor($days); //just return the number of days (no fraction)
}
function convertToHYD($date){
//takes a date like yyyy-mm-dd
list ($year, $month, $day) = explode("-", $date);
$jd = gregoriantojd($month, $day, $year);
$sd = gregoriantojd(1,1,1900);
return ($jd - $sd);
}
function convertFromHYD($date){
$sd = gregoriantojd(1,1,1900);
$total = $sd + $date;
return jdtogregorian($total);
}
echo ($hyd = converttohyd('2007-10-27'));
echo "<br/>";
echo convertfromhyd($hyd);
39380
10/27/2007