W3Schools.com

PHP JDMonthName() Function


PHP Calendar Reference Complete PHP Calendar Reference

Definition and Usage

The JDMonthName() function returns a month name.

Syntax

jdmonthname(jd,mode)

Parameter Description
jd Required. A number (a Julian day count)
mode Optional. Defines which calendar to convert the Julian day count to, and what type of month names are to be returned. Mode values:
  • 0 - Gregorian - abbreviated (Jan, Feb, Mar, etc.)
  • 1 - Gregorian (January, February, March, etc.)
  • 2 - Julian - abbreviated (Jan, Feb, Mar, etc.)
  • 3 - Julian (January, February, March, etc.)
  • 4 - Jewish (Tishri, Heshvan, Kislev, etc.)
  • 5 - French Republican (Vendemiaire, Brumaire, Frimaire, etc.)


Example

<?php
$jd=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y"));
echo(jdmonthname($jd,1));
?>

The output of the code above could be:

January


PHP Calendar Reference Complete PHP Calendar Reference
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE