Convert a Gregorian date to a Julian Day Number and then convert it back to a Gregorian date.
<?php $jd=gregoriantojd(6,20,2007); echo $jd . “<br>”; echo jdtogregorian($jd); ?> |
The jdtogregorian() function converts a Julian Day Number to a Gregorian date.
Tip: Use the gregoriantojd() function to convert a Gregorian date to a Julian Day Number.
jdtogregorian(jd); |
Parameter |
Description |
jd |
Required. A Julian Day Number. |
Return Value: |
Returns a Gregorian date in the format “month/day/year”. |
PHP Version: |
4+ |