Menu Home

unixtojd

osbo.com | PHP | Functions | unixtojd

Convert Unix timestamp to Julian Day

Syntax

unixtojd ([ int $timestamp = time() ] ) : int

Parameters

timestamp

A unix timestamp to convert.

Return

A julian day number as integer.

Examples

void

<?

$return = unixtojd();

echo $return;

?>
2459321

timestamp

<?

$timestamp = time();

$return = unixtojd($timestamp);

echo $return;

?>
2459321

PHP