PHP JDMonthName

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : jdmonthname() function

Description

The jdmonthname() function is used to get the month name of a given Julian Day and calendar.

Version

(PHP 4 and above)

Syntax

jdmonthname(julian_day, calendar_mode)

Parameters

Name

Description

Required /
Optional

Type

julian_day

A Julian day number.

Required

Integer

calendar_mode

0 - Gregorian - abbreviated
Values : Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.

1 - Gregorian
Values : January, February, March, April, May, June, July, August, September, October, November, December .

2 - Julian - abbreviated.
Values - Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.

3 - Julian
Values - January, February, March, April, May, June, July, August, September, October, November, December.

4 - Jewish
Values - Tishri, Heshvan, Kislev, Tevet, Shevat, AdarI, AdarII, Nisan, Iyyar, Sivan, Tammuz, Av, Elul.

5 - French Republican
Values - Vendemiaire, Brumaire, Frimaire, Nivose, Pluviose, Ventose, Germinal, Floreal, Prairial, Messidor, Thermidor, Fructidor, Extra.

Optional

Integer

 

Return value

The month name.

Value Type : String.

Example :

  1. $jd_day=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y"));  

  2. echo 'Gregorian - abbreviated : '. jdmonthname($jd_day,0).'
    ';  

  3. echo 'Gregorian : '. jdmonthname($jd_day,1).'
    ';  

  4. echo 'Julian - abbreviated : '.jdmonthname($jd_day,2).'
    ';  

  5. echo 'Julian : '.jdmonthname($jd_day,3).'
    ';  

  6. echo 'Jewish : '.jdmonthname($jd_day,4).'
    ';  

  7. ?>  

Output :

Gregorian - abbreviated : Jul
Gregorian : July
Julian - abbreviated : Jul
Julian : July
Jewish : Av

Note :

Since the example above involves current date, so your output may vary from the output shown in this page.