Computer >> Computer tutorials >  >> Programming >> PHP

jdtounix() function in PHP


The jdtounix() function converts a Julian day count to a Unix timestamp.

Syntax

jdtounix(julian_day)

Parameters

  • julian_day − A julian day

Return

The jdtounix() function returns the Unix timestamp for the start of the specified Julian day.

Example

The following is an example −

<?php
   $res = gregoriantojd(10,6,2017);
   echo jdtounix($res);
?>

Output

The following is the output −

1507248000