Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

jdmonthname()

Example

Return the abbreviated Gregorian month name for January 13, 1998.

<?php
$jd=gregoriantojd(1,13,1998);
echo jdmonthname($jd,0);
?>

Definition and Usage

The jdmonthname() function returns the name of a month.

Syntax

jdmonthname(jd,mode);

Parameter Values

Parameter

Description

jd

Required. A Julian Day Number.

mode

Optional. Specifies the calendar to convert the Julian Day Number to and how to return the month name. Mode values are:

  • 0 – Gregorian, abbreviated form (Jan, Feb, Mar, etc.)
  • 1 – Gregorian, full name (January, February, March, etc.)
  • 2 – Julian, abbreviated form (Jan, Feb, Mar, etc.)
  • 3 – Julian, full name (January, February, March, etc.)
  • 4 – Jewish (Tishri, Heshvan, Kislev, etc.)
  • 5 – French Republican (Vendemiaire, Brumaire, Frimaire, etc.)

Technical Details

 

Return Value:

Returns the month name for the given Julian Day Number and calendar system.

PHP Version:

4+