Home >Backend Development >PHP Tutorial >JDMonthName() function in PHP

JDMonthName() function in PHP

王林
王林forward
2023-09-11 20:05:071379browse

JDMonthName() function in PHP

The JDMonthName() method returns a month name.

Syntax

jdmonthname(julian_day, mode)

Parameters

  • julian_day - A Julian day number

  • mode - Specifies which calendar to convert Julian day numbers to, and what type of month name to return:

    • 0 - Gregorian abbreviation (Jan, Feb, Mar, etc.)

    • 1 - Gregorian calendar (January, February, March, etc.)

    • 2 - Julian calendar abbreviation ( Jan, Feb, Mar, etc.)

    • 3 - Julian calendar (January, February, March, etc.)

    • 4 - Jewish calendar (Tishri , Heshvan, Kislev, etc.)

    • 5 - French Republican Calendar (Vendimaire, Brumaire, Frimaire, etc.)

Return Values ​​

The JDMonthName() function returns the name of the month for the specified Julian day and calendar.

Example

Here is an example:

Demo link

<?php
$res = gregoriantojd(8,9,2018);
echo jdmonthname($res,0);
?>

Output

Aug

The above is the detailed content of JDMonthName() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete