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

jdtojulian()

Example

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

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

Definition and Usage

The jdtojulian() function converts a Julian Day Number to a Julian calendar date.

Tip: Use the juliantojd() function to convert a Julian calendar date to a Julian Day Number.

Syntax

jdtojulian(jd);

Parameter Values

Parameter

Description

jd

Required. A Julian Day Number.

Technical Details

 

Return Value:

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

PHP Version:

4+