PHP JDToUnix() Function
Example
Convert a date in the Gregorian calendar to a Julian day count, and then convert the Julian day count to a Unix timestamp:
<?php $jd=gregoriantojd(9,25,2016); echo jdtounix($jd); ?>
Definition and Usage
The jdtounix() function converts Julian day counts to Unix timestamps.
Note:If the parameter jd If not in the Unix new era (meaning the Gregorian year must be between 1970 and 2037, or jd >= 2440588 and jd <= 2465342), the function will return false. The returned time is local time.
Tip:See also unixtojd() Converts a Unix timestamp to a Julian day count.
Syntax
jdtounix(jd);
Parameter | Description |
---|---|
jd | Required. A Julian day number between 2440588 and 2465342. |
Technical Details
Return Value: | Returns the Unix timestamp at the start of the specified Julian date. |
---|---|
PHP Version: | 4+ |