Class

IslamicCal

IslamicCal(optionsopt)

Construct a new Islamic calendar object. This class encodes information about the civil Islamic calendar. The civil Islamic calendar is a tabular islamic calendar where the dates are calculated by arithmetic rules. This differs from the religious Islamic calendar which is used to mark the beginning of particular holidays. The religious calendar depends on the first sighting of the new crescent moon to determine the first day of the new month. Because humans and weather are both involved, the actual time of sighting varies, so it is not really possible to precalculate the religious calendar. Certain groups, such as the Islamic Society of North America, decreed in in 2007 that they will use a calendar based on calculations rather than observations to determine the beginning of lunar months, and therefore the dates of holidays.

Constructor

# new IslamicCal(optionsopt)

Parameters:
Name Type Attributes Description
options Object <optional>

Options governing the construction of this instance

View Source IslamicCal.js, line 41

Extends

Methods

# getMonLength(month, year) → {number}

Return the number of days in a particular month in a particular year. This function can return a different number for a month depending on the year because of things like leap years.

Parameters:
Name Type Description
month number

the month for which the length is sought

year number

the year within which that month can be found

Overrides:

View Source IslamicCal.js, line 92

the number of days within the given month in the given year

number

# getNumMonths(year)

Return the number of months in the given year. The number of months in a year varies for luni-solar calendars because in some years, an extra month is needed to extend the days in a year to an entire solar year. The month is represented as a 1-based number where 1=first month, 2=second month, etc.

Parameters:
Name Type Description
year number

a year for which the number of months is sought

Overrides:

View Source IslamicCal.js, line 79

# getType() → {string}

Return the type of this calendar.

Overrides:

View Source IslamicCal.js, line 115

the name of the type of this calendar

string

# isLeapYear(year) → {boolean}

Return true if the given year is a leap year in the Islamic calendar. The year parameter may be given as a number, or as a IslamicDate object.

Parameters:
Name Type Description
year number

the year for which the leap year information is being sought

Overrides:

View Source IslamicCal.js, line 106

true if the given year is a leap year

boolean