In this article, you will learn how to use the PHP juliantojd() function to convert a Julian Date to a Julian Day Count.
What is the syntax of the juliantojd() function in PHP?
juliantojd(jd);
Parameters | Details |
---|---|
month | Specify the month number(1-12) – Required |
day | Specify the month number(1-31) – Required |
year | Specify the year number (-4713-9999)- Required |
Examples of the juliantojd() function
Example 1. In the following example, we simply convert a Julian Date to Julian Day Count and then convert the Julian Day Count back to Julian Date.
<?php
$j_d=juliantojd(1998);
echo $j_d;
echo jdtojulian($j_d);
?>