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/*from  w w  w .  ja  v a  2 s . co  m*/
$jd=gregoriantojd(6,20,2014);
echo $jd . "\n";
echo jdtogregorian($jd);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions