PHP Tutorial - PHP jdmonthname() Function






Definition

The jdmonthname() function returns a month name.

Syntax

PHP jdmonthname() Function has the following syntax.

jdmonthname(jd,mode);

Parameter

ParameterIs RequiredDescription
jdRequired.A Julian Day number
modeOptional.Which calendar to convert the Julian Day Count to, and how the month name is to be returned.

Mode values:

ValueDescription
0 - Gregorianabbreviated form such as Jan, Feb, Mar, etc.
1 - Gregorianfull name form such as January, February, March, etc.
2 - Julianabbreviated form (Jan, Feb, Mar, etc.)
3 - Julianfull name form (January, February, March, etc.)
4 - JewishTishri, Heshvan, Kislev, etc.
5 - FrenchRepublican Vendemiaire, Brumaire, Frimaire, etc.




Return

PHP jdmonthname() Function returns the month name for the specified Julian Day and calendar.

Example

Return the abbreviated Gregorian monthname of 13th January, 2013:


<?php
$jd=gregoriantojd(1,13,2013);
echo jdmonthname($jd,0);
?>

The code above generates the following result.