PHP cal_to_jd() function

Trusted SSL from just $3.44
Advertisements
PHP cal_info() function
PHP easter_date() function

In this article, you will learn how to get the Julian Day Count from the date. The cal_to_jd() function converts a date in the given calendar to the Julian Day Count.

Trusted SSL from just $3.44
Advertisements

Note: The JulianDayCount is the count of days since Julian Day (January 1, 4713 B.C.).

What is the syntax of the cal_to_jd() function in PHP?

cal_to_jd(calendar,month,day,year);
ParametersDetails
calendarSpecify one of the calendars below to convert from
CAL_GREGORIAN
CAL_JULIAN
CAL_JEWISH
CAL_FRENCH
monthMonth (as numeric number) – Required
day Day (as numeric number) – Required
year Year (as numeric number) – Required
PHP cal_to_jd() function

Examples of cal_to_jd() function

Example 1. Convert 10th of January, 2021 (Gregorian calendar) to Julian Day Count.

<?php
$date=cal_to_jd(CAL_GREGORIAN,01,10,2021);
echo $date;
?>
PHP cal_info() function
PHP easter_date() function
close

Stay up-to-date about PHP!

We don’t spam!

Trusted SSL from just $3.44
Advertisements
en English
X
Scroll to Top