PHP
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

JDToFrench> <JDDayOfWeek
Last updated: Fri, 02 Jan 2009

view this page in

JDMonthName

(PHP 4, PHP 5)

JDMonthNameReturns a month name

Description

string jdmonthname ( int $julianday , int $mode )

Returns a string containing a month name. mode tells this function which calendar to convert the Julian Day Count to, and what type of month names are to be returned.

Calendar modes
Mode Meaning Values
0 Gregorian - abbreviated Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
1 Gregorian January, February, March, April, May, June, July, August, September, October, November, December
2 Julian - abbreviated Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
3 Julian January, February, March, April, May, June, July, August, September, October, November, December
4 Jewish Tishri, Heshvan, Kislev, Tevet, Shevat, AdarI, AdarII, Nisan, Iyyar, Sivan, Tammuz, Av, Elul
5 French Republican Vendemiaire, Brumaire, Frimaire, Nivose, Pluviose, Ventose, Germinal, Floreal, Prairial, Messidor, Thermidor, Fructidor, Extra

Parameters

jday

The Julian Day to operate on

calendar

The calendar to take the month name from

Return Values

The month name for the given Julian Day and calendar .



add a note add a note User Contributed Notes
JDMonthName
Shai
24-Sep-2005 05:12
YIQV, this should correct your issue with Adar being displayed as AdarI:

<?php

// assuming that $jewish_month is the Jewish month,
// and $jewish_year is the Jewish year,
// you can use this script to replace 'Adar I' with 'Adar' when it is not a leap year.
// this is because a Jewish leap year occurs every 3rd, 6th, 8th, 11th, 14th, 17th, and 19th year.

if(    $jewish_month == "AdarI" &&
   
$jewish_year%19 != 0 &&
   
$jewish_year%19 != 3 &&
   
$jewish_year%19 != 6 &&
   
$jewish_year%19 != 8 &&
   
$jewish_year%19 != 11 &&
   
$jewish_year%19 != 14 &&
   
$jewish_year%19 != 17
) {

   
$jewish_month = "Adar";

}

?>
YIQV
30-Jan-2005 12:47
I am finding an inconsistency in the Jewish month Adar. The function always returns AdarI regardless of whether the year is a jewish leapyear. The month is known as Adar (not AdarI) in non-leap years. Also when using function jdtojewish with bool hebrew set to true it always returns (ADR) and not (ADR A) when it's a leap year. AdarII in Hebrew and English seems to work properly.

JDToFrench> <JDDayOfWeek
Last updated: Fri, 02 Jan 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites