Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

jdtogregorian()

Example

Convert a Gregorian date to a Julian Day Number and then convert it back to a Gregorian date.

<?php
$jd=gregoriantojd(6,20,2007);
echo $jd . “<br>”;
echo jdtogregorian($jd);
?>

Definition and Usage

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

 

Tip: Use the gregoriantojd() function to convert a Gregorian date to a Julian Day Number.

Syntax

jdtogregorian(jd);

Parameter Values

 

Parameter

Description

jd

Required. A Julian Day Number.

Technical Details

Return Value:

Returns a Gregorian date in the format “month/day/year”.

PHP Version:

4+