In this article, you will learn how to get the date out of Julian Day count. The cal_from_jd() function converts the Julian Day count into the corresponding date of the given calendar.
Note: The Julian Day Count is the count of days since Julian Day (January 1, 4713 B.C.).
What is the syntax of the cal_from_jd() function?
cal_from_jd(jd,calendar);
Parameters | Details |
---|---|
jd | Julian Day – Required |
calendar | One of the following Calendars to get the date according to – Required CAL_GREGORIAN CAL_JULIAN CAL_JEWISH CAL_FRENCH |
Examples of cal_from_jd function
<?php
$date=unixtojd(mktime(0,0,0,9,10,2021));
print_r(cal_from_jd($date,CAL_GREGORIAN));
?>