PHP UnixToJD() Function

Example

Convert Unix timestamp to Julian day count:

<?php
echo unixtojd();
?>

Running Instance

Definition and Usage

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

Note:Unix timestamp indicates the number of seconds from midnight on January 1, 1970 (Gregorian calendar, solar calendar) to the present.

Tip:See Also jdtounix() The function converts Julian day count to Unix timestamp.

Syntax

unixtojd(timestamp);
Parameters Description
timestamp Optional. Specifies the Unix timestamp to be converted.

Technical Details

Return Value: returns the Julian day number of the Unix timestamp (the number of seconds from January 1, 1970 to the present), or if not given timestampreturns the Julian day number of the current time.
PHP Version: 4+