cal_to_jd – Convert Supported Calendar Date to Julian Day Number

The cal_to_jd() function in PHP calculates the Julian Day count from a given date, supporting Gregorian, Julian, Jewish, and French calendars, and returns the corresponding Julian Day number based on the provided calendar, month, day, and year parameters.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
cal_to_jd – Convert Supported Calendar Date to Julian Day Number

The cal_to_jd() function computes the Julian Day number for a specified date, supporting the calendars CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH, and CAL_FRENCH.

int cal_to_jd(int $calendar, int $month, int $day, int $year)

Parameters

calendar : The selected calendar, which must be one of CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH, or CAL_FRENCH.

month : The month as an integer, with its valid range determined by the chosen calendar.

day : The day of the month as an integer, also dependent on the selected calendar.

year : The year as an integer, interpreted according to the chosen calendar.

Return value

Returns a Julian Day number representing the given calendar date.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendPHPCalendarDate ConversionJulian Day
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.