Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP jdtounix() Function

PHP jdtounix() Function

PHP Calendar Reference Manual PHP Calendar Reference Manual

Example

Convert a Gregorian calendar date to a Julian day count, then convert the Julian day count to a Unix timestamp:

Run Example »


Definition and Usage

The jdtounix() function converts a Julian day count to a Unix timestamp.

**Note:** If the parameter jd is not within the Unix epoch (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 the unixtojd() Converts a Unix timestamp to a Julian day count.

Syntax

jdtounix

(jd);

Parameters 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 day.
PHP Version: 4+

PHP Calendar Reference Manual PHP Calendar Reference Manual