PHP juliantojd()Functions

PHP Calendar 参考手册PHP Calendar Reference Manual

Examples

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

<?php
$jd=juliantojd(6,20,2007);
echo $jd . "<br>";
echo jdtojulian($jd);
?>

Run Example »

Definition and Usage

juliantojd() converts a Julian calendar date to a Julian Day Count.

Note:The valid range for dates handled by this function is from 4713 BC in the Julian calendar to 9999 AD. The function can calculate to 4713 BC, but this is not very meaningful. The Julian calendar was established in 46 BC, but some details were not stabilized until 8 AD. Different cultures define the start of the year differently - not all countries recognize January as the first month of the year. Remember that the currently universal calendar is the Gregorian calendar.gregoriantojd()The function is used to convert these dates to their Julian Day Count.

Tip:See also jdtojulian()The function converts a Julian Day Count to a Julian calendar date.

Syntax

juliantojd(month,day,year);

Parameters Description
month Required. A number from 1 to 12, specifying the month.
day Required. A number from 1 to 31, specifying the day.
year Required. A number from -4713 to 9999, specifying the year.

Technical Details

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


PHP Calendar 参考手册PHP Calendar Reference Manual Other Extensions