jdtogregorianCONVERTS a
Julian Day Number, (JDN) to a
Gregorian Calendar date.
<?php
str jdtogregorian ( int $julianday )
where,
$julianday = A Julian Day Number, (JDN)
?>
$julianday
A Julian Day Number, (JDN).
Julian Day Number, (JDN) also known as Julian Day Count, (JDC), indicates the number of days elapsed since January 1, 4713 BC, Gregorian Calendar.
The Julian Calendar was introduced by Júlio Cesar in 46 BC, according the Gregorian Calendar.
The valid range for the Gregorian Calendar is from November 25, 4714 BC to at least December 31, 9999 AD.
Although this function can handle dates all the way back to 4714 BC, such use may not be meaningful.
The Gregorian Calendar was not instituted until October 15, 1582, (or October 5, 1582 in the Julian Calendar).
Some countries did not accept it until much later.
For example, Britain converted in 1752, The USSR in 1918 and Greece in 1923.
Most European countries used the Julian Calendar prior to the Gregorian.
This function can be considered inverse to the function gregoriantojd.
EXERCISE
<?php
$jdn01 = 2458520;
$jdn2gr01 = jdtogregorian($jdn01);
echo $jdn01 . '<sub>JDN</sub> => ' . $jdn2gr01 . '<sub>(month-day-year) Gregorian</sub><br><br>';
?>
EXERCISE
<?php
$jdn02 = 2431523;
$jdn2gr02 = jdtogregorian($jdn02);
echo $jdn02 . '<sub>JDN</sub> => ' . $jdn2gr02 . '<sub>(month/day/year) Gregorian</sub><br><br>';
?>
EXERCISE
<?php
$jdn03 = 1;
$jdn2gr03 = jdtogregorian($jdn03);
echo $jdn03 . '<sub>JDN</sub> => ' . $jdn2gr03 . '<sub>(month/day/year) Gregorian</sub><br><br>';
?>