Convert Julian Calendar Dates to Julian Day Numbers with PHP's juliantojd

Learn how PHP's juliantojd function converts Julian calendar dates—valid from 4713 B.C. to 9999 A.D.—into Julian Day Numbers, including its signature, parameter ranges, historical context, and the meaning of its return value for developers.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
Convert Julian Calendar Dates to Julian Day Numbers with PHP's juliantojd

PHP provides the built-in function juliantojd to convert a date expressed in the Julian calendar to its corresponding Julian Day Number.

Function signature

int juliantojd(int $month, int $day, int $year)

The Julian calendar is defined for years from 4713 B.C. to 9999 A.D. Although the function can technically handle dates earlier than 4713 B.C., such values are historically meaningless. The calendar was introduced in 46 B.C., became stable around the 4th century, and the start of the year varied across regions.

Parameters

month : integer from 1 (January) to 12 (December).

day : integer from 1 to 31.

year : integer from –4713 to 9999.

Return value

The function returns the Julian Day Number that corresponds to the supplied Julian 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.

BackendPHPDate ConversionJulian Calendarjuliantojd
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.