PHP Tutorial - PHP unixtojd() Function






Definition

The unixtojd() function converts Unix timestamp to Julian Day Count.

Syntax

PHP unixtojd() Function has the following syntax.

unixtojd(timestamp);

Parameter

  • timestamp - Optional. Specifies A unix timestamp to convert

Return

PHP unixtojd() Function returns the Julian Day number for a Unix timestamp (seconds since 1.1.1970), or for the current day if no timestamp is given.





Example

Convert Unix timestamp to Julian Day Count


<?php
echo unixtojd();
?>

The code above generates the following result.