PHP - Function jdtounix()


Advertisements


Syntax

jdtounix ( $jday );

Definition and Usage

This function will return a Unix timestamp corresponding to the Julian Day given in jday or FALSE if jday is not inside the Unix epoch (Gregorian years between 1970 and 2037 or 2440588 < jday < 2465342 ). The time returned is localtime (and not GMT).

Parameters

Sr.No Parameter & Description
1

jday

Required. A julian day number between 2440588 and 2465342.

Return Value

The unix timestamp for the start of the given julian day.

Example

Try out following example −

<?php
   $jd = gregoriantojd(11,3,1990);
   $unix = jdtounix($jd);
   
   echo($unix);
?> 

This will produce the following result −

657590400

php_function_reference.htm