Introduction
In this tutorial you will learn how to use PHP calendar functions. The PHP calendar functions are used to implement various types of calendar formats. Here I will explain some calendar functions and I am also describing some PHP calendar functions in PART 1 and PART 2.
PHP Calendar JDMonthName function
It returns the current month name as a string.
Syntax
| jdmonthname (jd, mode) |
Parameters in JDMonthName function
It has two parameters and the jd parameter is required and the mode parameter is optional.
| Parameter | Description |
| jd | It specifies Julian day. |
| day | It specifies which calendar to convert the Julian day count, it have different mode. 0 (zero)- means Gregorian (Jan , Feb, Mar etc) name will be returns. 1 (one )- means Gregorian (January , February, March etc) name will be returns. 2 (two )- means Julian (Jan , Feb, Mar etc) name will be returns. 3 (three)- means Julian (Jan , Feb, Mar etc) name will be returns. 4 (four)- means Jewish (Tishri , Heshvan, Kislev etc) name will be returns. 5 (five)- means French Republican (Vendemiaire , Brumarie, Frimarie etc) name will be returns. |
Example of JDMonthName function
<?php
$jday=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y"));
echo(jdmonthname($jday,1))."</br>";
echo(jdmonthname($jday,4));
?>
Output
PHP Calendar JDToFrench function
It converts a Julian day count to French Republican calendar date.
Syntax
| jdtofrench (jd) |
Parameters in JDToFrench function
It has one parameter.
| Parameter | Description |
| jd | It specifies Julian day count as integer. |
Example of JDMonthName function
<?php
$date=jdtofrench(2380211);
echo $date;
?>




Join the conversation! Your thoughts help the community grow.