jdmonthname() returns a calendar month name from a Julian Day count.
$jd = gregoriantojd(9, 14, 2026);
echo jdmonthname($jd, CAL_MONTH_GREGORIAN_LONG);$day_number = cal_to_jd(CAL_JULIAN,12,4,2013);
$month_name = jdmonthname($day_number,2);
echo $month_name;
The output is Dec
CAL_MONTH_GREGORIAN_SHORT: Jan, Feb, Mar ...
CAL_MONTH_GREGORIAN_LONG: January, February, March ...
CAL_MONTH_JULIAN_SHORT: Jan, Feb, Mar ...
CAL_MONTH_JULIAN_LONG: January, February, March ...
CAL_MONTH_JEWISH: Tishri, Heshvan, Kislev ...
CAL_MONTH_FRENCH: Vendemiaire, Brumaire, Frimaire ...
Syntax
jdmonthname($julianDay, $mode)
Here is an example.
echo date('M');
Output is
Octdate("m")output is 10Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.