jdtogregorian

string jdtogregorian(int JD) 

Converts a Julian day count to a Gregorian calendar date of the format MM/DD/YY.

Returns:

Gregorian calendar date; 0/0/0 if JD is not a valid Julian day count

Description:

jdtogregorian() converts a Julian day count to a Gregorian calendar date. The date is returned as a string with the format MM/DD/YY. If an invalid Julian day count is specified, the function returns 0/0/0.

Version:

3+, 4+

See also:

To convert a Gregorian calendar date to a Julian day count:

gregoriantojd() 

To get a Julian day count from another calendar system, see the various *tojd functions.

Example:

Convert a Julian calendar date to a Gregorian calendar date
 // Write a function to add the proper ordinal suffix to a number ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.