I l@ve RuBoard Previous Section Next Section

jdtounix

int jdtounix(int JD) 

Converts a Julian day count to a UNIX timestamp.

Returns:

UNIX timestamp; FALSE if an invalid Julian day count is specified

Description:

jdtounix() converts a Julian day count to a UNIX timestamp. The function returns FALSE if the Julian day count is outside the displayable range of the UNIX timestamp (Julian day counts 2440588 to 2465343 for Gregorian calendar years 1970 to 2037).

Version:

Available in PHP 4.0.0 RC2 or greater

See also:

To convert a UNIX timestamp to a Julian day count:

unixtojd() 

To get a Julian day count from another calendar system, see the various *tojd functions.

Example:

Convert a Julian day count to a UNIX timestamp
$julian_day = 2451202; 
$unix_timestamp = jdtounix ($julian_day); 
echo "The UNIX timestamp for Julian day count $julian_day is $unix_timestamp"; 
    I l@ve RuBoard Previous Section Next Section