PHP juliantojd() Function
In this chapter you will learn:
- Definition for PHP juliantojd() Function
- Syntax for PHP juliantojd() Function
- Parameter for PHP juliantojd() Function
- Return for PHP juliantojd() Function
- Example - Convert a Julian date to a Julian Day Count and back to a Julian date:
Definition
The juliantojd() function converts a date from the Julian Calendar to a Julian Day Count.
Syntax
juliantojd(month,day,year);
Parameter
Parameter | Is Required | Description |
---|---|---|
month | Required. | Month value as a number from 1 to 12 |
day | Required. | Day value as a number from 1 to 31 |
year | Required. | Year value as a number between -4713 and 9999 |
Return
Convert a Jewish date to a Julian Day Count returns a Julian Day number.
Example
Convert a Julian date to a Julian Day Count and back to a Julian date
<?php/*from jav a 2s . c o m*/
$jd=juliantojd(6,20,2012);
echo $jd . "\n";
echo jdtojulian($jd);
?>
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP unixtojd() Function
- Syntax for PHP unixtojd() Function
- Parameter for PHP unixtojd() Function
- Return value from PHP unixtojd() Function
- Example - Convert Unix timestamp to Julian Day Count
Home » PHP Tutorial » PHP Calendar Functions