PHP gregoriantojd () function
Examples
The Gregorian calendar date is converted to Julian day count, back to Gregorian calendar date and then converted:
<?php
$jd=gregoriantojd(6,20,2007);
echo $jd . "<br>";
echo jdtogregorian($jd);
?>
$jd=gregoriantojd(6,20,2007);
echo $jd . "<br>";
echo jdtogregorian($jd);
?>
Running instance »
Definition and Usage
gregoriantojd () function to the Gregorian calendar dates converted to Julian day count.
Note: Although this function can handle dates before 4714 BC, you still have to pay attention to the Gregorian calendar in 1582 was the establishment of a number of countries or even later before accepting it (Great Britain in 1752, the Soviet Union in 1918, Greece in 1923 year). Most European countries use the Julian calendar (Gregorian calendar) prior to the Gregorian calendar.
Tip: See jdtogregorian () function is used to convert a Julian day count Gregorian calendar date.
grammar
gregoriantojd( month,day,year);
参数 | 描述 |
---|---|
month | 必需。一个从 1 到 12 的数字,规定月。 |
day | 必需。一个从 1 到 31 的数字,规定日。 |
year | 必需。一个从 -4714(表示 4714 B.C.)到 9999(表示 9999 A.D.)的数字,规定年。 |
technical details
return value: | Returns the Julian day numbers. |
---|---|
PHP version: | 4+ |
PHP Calendar Reference Manual