unixtojd() function in PHP


The unixtojd() function converts a Unix timestamp to a Julian day count. It returns the the Julian Day for a Unix timestamp (seconds since 1.1.1970), or for the current day if no timestamp is given.

Syntax

unixtojd(timestamp)

Parameters

  • timestamp − Unix timestamp to convert.

Return

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

Example

The following is an example −

Live Demo

<?php
   echo unixtojd();
?>

Output

2458402

Updated on: 30-Jul-2019

24 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements