jdmonthname: Month name from Julian day count

Get a month name from a Julian Day count

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

By changing the mode we can get month in different formats.
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.

Getting current month name

Easy way is to use the date format to get current month name.
echo date('M');
Output is Oct
date("m")
output is 10
Unix timestamp to Julian day count
Date Picker using JQuery
Calendar Functions


Subscribe to our YouTube Channel here



plus2net.com











PHP video Tutorials
✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer