new UmmAlQuraCalendar(languageopt)
Implementation of the UmmAlQura or 'saudi' calendar.
See also http://en.wikipedia.org/wiki/Islamic_calendar#Saudi_Arabia.27s_Umm_al-Qura_calendar.
http://www.ummulqura.org.sa/About.aspx
http://www.staff.science.uu.nl/~gent0113/islam/ummalqura.htm
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
language |
string |
<optional> |
'' | The language code (default English) for localisation. |
- Source:
Members
(static) firstMonth
The first month in the year.
- Source:
(static) hasYearZero
true
if has a year zero, false
if not.
- Source:
(static) minDay
The minimum day number.
- Source:
(static) minMonth
The minimum month number.
- Source:
(static) name
The calendar name.
- Source:
(static) regionalOptions
Localisations for the plugin.
Entries are objects indexed by the language code ('' being the default US/English).
Each object has the following attributes.
Properties:
Name | Type | Description |
---|---|---|
name |
string | The calendar name. |
epochs |
Array.<string> | The epoch names (before/after year 0). |
monthNames |
Array.<string> | The long names of the months of the year. |
monthNamesShort |
Array.<string> | The short names of the months of the year. |
dayNames |
Array.<string> | The long names of the days of the week. |
dayNamesShort |
Array.<string> | The short names of the days of the week. |
dayNamesMin |
Array.<string> | The minimal names of the days of the week. |
dateFormat |
string | The date format for this calendar.
See the options on formatDate for details. |
firstDay |
number | The number of the first day of the week, starting at 0. |
isRTL |
boolean | true if this localisation reads right-to-left. |
- Source:
Methods
(static) daysInMonth(year, monthopt) → {number}
Retrieve the number of days in a month.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
year |
CDate | number | The date to examine or the year of the month. | |
month |
number |
<optional> |
The month (if only year specified above). |
- Source:
Throws:
Error if an invalid month/year or a different calendar used.
Returns:
The number of days in this month.
- Type
- number
(static) daysInYear(year) → {number}
Retrieve the number of days in a year.
Parameters:
Name | Type | Description |
---|---|---|
year |
CDate | number | The date to examine or the year to examine. |
- Source:
Throws:
Error if an invalid year or a different calendar used.
Returns:
The number of days.
- Type
- number
(static) fromJD(jd) → {CDate}
Create a new date from a Julian date.
Parameters:
Name | Type | Description |
---|---|---|
jd |
number | The Julian date to convert. |
- Source:
Returns:
The equivalent date.
- Type
- CDate
(static) isValid(year, month, day) → {boolean}
Determine whether a date is valid for this calendar.
Parameters:
Name | Type | Description |
---|---|---|
year |
number | The year to examine. |
month |
number | The month to examine. |
day |
number | The day to examine. |
- Source:
Returns:
true
if a valid date, false
if not.
- Type
- boolean
(static) leapYear(year) → {boolean}
Determine whether this date is in a leap year.
Parameters:
Name | Type | Description |
---|---|---|
year |
CDate | number | The date to examine or the year to examine. |
- Source:
Throws:
Error if an invalid year or a different calendar used.
Returns:
true
if this is a leap year, false
if not.
- Type
- boolean
(static) toJD(year, monthopt, dayopt) → {number}
Retrieve the Julian date equivalent for this date,
i.e. days since January 1, 4713 BCE Greenwich noon.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
year |
CDate | number | The date to convert or the year to convert. | |
month |
number |
<optional> |
The month to convert (if only year specified above). |
day |
number |
<optional> |
The day to convert (if only year specified above). |
- Source:
Throws:
Error if an invalid date or a different calendar used.
Returns:
The equivalent Julian date.
- Type
- number
(static) weekDay(year, monthopt, dayopt) → {boolean}
Determine whether this date is a week day.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
year |
CDate | number | The date to examine or the year to examine. | |
month |
number |
<optional> |
The month to examine (if only year specified above). |
day |
number |
<optional> |
The day to examine (if only year specified above). |
- Source:
Throws:
Error if an invalid date or a different calendar used.
Returns:
true
if a week day, false
if not.
- Type
- boolean
(static) weekOfYear(year, monthopt, dayopt) → {number}
Determine the week of the year for a date.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
year |
CDate | number | The date to examine or the year to examine. | |
month |
number |
<optional> |
The month to examine (if only year specified above). |
day |
number |
<optional> |
The day to examine (if only year specified above). |
- Source:
Throws:
Error if an invalid date or a different calendar used.
Returns:
The week of the year.
- Type
- number