Example 1 — Short and Long Month Names
Get the month name for January 1, 2000 in the Gregorian and Julian calendars, in short and long form.
<?php
$jd = gregoriantojd(1, 1, 2000);
echo jdmonthname($jd, 0), PHP_EOL;
echo jdmonthname($jd, 1), PHP_EOL;
echo jdmonthname($jd, 2), PHP_EOL;
echo jdmonthname($jd, 3), PHP_EOL; How It Works
- Mode 0 gives the short Gregorian name, and mode 1 gives the full Gregorian name.
- Modes 2 and 3 use the Julian calendar instead of the Gregorian one.
- January 1, 2000 is December 19, 1999 in the Julian calendar.
- So the Julian modes return Dec and December.

