unixtojd

Convert Unix timestamp to Julian Day

Syntax

unixtojd(?int $timestamp = null): int|false

Parameters

timestamp

A unix timestamp to convert.

Return

A julian day number as integer, or false on failure.

Examples

void

<?

$return = unixtojd();

echo $return;

?>
2459558

timestamp

<?

$timestamp = time();

$return = unixtojd($timestamp);

echo $return;

?>
2459558

PHP

Home Menu