unixtojd

(PHP 4, PHP 5, PHP 7, PHP 8)

unixtojdConvert Unix timestamp to Julian Day

Опис

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

Return the Julian Day for a Unix timestamp (seconds since 1.1.1970), or for the current day if no timestamp is given. Either way, the time is regarded as local time (not UTC).

Параметри

timestamp

A unix timestamp to convert.

Значення, що повертаються

A julian day number as integer, або false в разі помилки.

Журнал змін

Версія Опис
8.0.0 timestamp is nullable now.

Прогляньте також

  • jdtounix() - Convert Julian Day to Unix timestamp