Easy Tutorial
❮ Func Filesystem Fopen Pdostatement Getattribute ❯

PHP gregoriantojd() Function

PHP Calendar Reference Manual

Example

Convert a Gregorian date to a Julian Day Count, and then convert it back to a Gregorian date:


Definition and Usage

The gregoriantojd() function converts a Gregorian date to a Julian Day Count.

Note: Although this function can handle dates before 4714 B.C., keep in mind that the Gregorian calendar was established in 1582, and some countries adopted it much later (Great Britain in 1752, Soviet Union in 1918, Greece in 1923). Most European countries used the Julian calendar (Julian calendar) before the Gregorian calendar.

Tip: See the jdtogregorian() function to convert a Julian Day Count to a Gregorian date.

Syntax

Parameter Description
month Required. A number from 1 to 12 that specifies the month.
day Required. A number from 1 to 31 that specifies the day.
year Required. A number from -4714 (representing 4714 B.C.) to 9999 (representing 9999 A.D.) that specifies the year.

Technical Details

Return Value: Returns the Julian Day number.
PHP Version: 4+
--- ---

❮ Func Filesystem Fopen Pdostatement Getattribute ❯