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 the Julian Day Count to, and what type of month names is to be returned−

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

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

    • 2 - Julian - abbreviated form (Jan, Feb, Mar, etc.)

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

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

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

Return

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

Example

The following is an example −

 Live Demo

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

Output

Aug

Updated on: 24-Jun-2020

26 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements