PHP Tutorial - PHP jdtogregorian() Function






Definition

The jdtogregorian() function converts a Julian Day Count to a Gregorian date.

Syntax

PHP jdtogregorian() Function has the following syntax.

jdtogregorian(jd);

Parameter

  • jd - Required. A Julian Day number

Return

PHP jdtogregorian() Function returns a Gregorian date in format "month/day/year".

Example

Convert a Gregorian date to a Julian Day Count and back to a Gregorian date:


<?php
$jd=gregoriantojd(6,20,2014);
echo $jd . "\n";
echo jdtogregorian($jd);
?>

The code above generates the following result.