w3resource
PHP Tutorial

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:

<?php
$jd_day=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y"));
echo 'Gregorian - abbreviated : '. jdmonthname($jd_day,0).'<br>';
echo 'Gregorian : '. jdmonthname($jd_day,1).'<br>';
echo 'Julian - abbreviated : '.jdmonthname($jd_day,2).'<br>';
echo 'Julian : '.jdmonthname($jd_day,3).'<br>';
echo 'Jewish : '.jdmonthname($jd_day,4).'<br>';
?>

Sample 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.

View the example in the browser

See also

PHP Function Reference

Previous: JDDayOfWeek
Next: JDToFrench



New Content: Composer: Dependency manager for PHP, R Programming


bedava porno