Current Location: Home> Function Categories> gregoriantojd

gregoriantojd

Convert the dates in the Gregorian calendar to Julian day counts.
Name:gregoriantojd
Category:Uncategorized
Programming Language:php
One-line Description:Convert the dates in the Gregorian calendar to Julian day counts.

Definition and usage

gregoriantojd() function converts the dates of the Gregorian calendar into Julian day counts.

Note: Although this function can handle dates before 4714 BC, you should note that the Gregorian calendar was established in 1582, and some countries accepted it even later (Greece in 1752, Soviet Union in 1918, Greece in 1923). Most European countries use the Roman Julian calendar (Gregorian calendar) before the Gregorian calendar.

Tip: See jdtogregorian() function to convert Julian day count to dates in the Gregorian calendar.

Example

Convert the dates of the Gregorian calendar to Julian day counts, and then convert them back to the dates of the Gregorian calendar:

 <?php
$jd = gregoriantojd ( 9 , 25 , 2016 ) ;
echo $jd . "<br>" ;
echo jdtogregorian ( $jd ) ;
?>

Run the instance

grammar

 gregoriantojd ( month , day , year ) ;
parameter describe
month Required. Numbers from 1 to 12, specified months.
day Required. Numbers from 1 to 31, specified date.
year Required. Numbers from -4714 (representing 4714 BC) to 9999 (representing 9999 AD), specify year.
Similar Functions
Popular Articles