Built-In Namespace _global_
Method Attributes | Method Name and Description |
---|---|
zeller(dayOfMonth, month, year, iso, calendarType, i18nDayMapping)
An algorithm to calculate the day of the week for any Julian or Gregorian calendar date.
|
Method Detail
{String|Number}
zeller(dayOfMonth, month, year, iso, calendarType, i18nDayMapping)
An algorithm to calculate the day of the week for any Julian or Gregorian calendar date.
Defined in: zeller.js.
Defined in: zeller.js.
- Parameters:
- {Number} dayOfMonth
- The day of the month.
- {Number} month
- The month.
- {Number} year
- The year.
- {Boolean} iso Optional
- If true return the ISO week date Day-of-Week (1 = Monday to 7 = Sunday), default is false.
- {String} calendarType Optional
- "julian" or "gregorian", default is "gregorian".
- {String[]} i18nDayMapping Optional
- An array of strings mapping "Saturday" to "Friday" in a given language (default is English, ignored if iso is true).
- Throws:
- {MissingParameters}
- If year, month, or dayOfMonth are not passed in.
- {InvalidParameters}
- If the day of the month or the month are not valid.
- {InvalidParameters}
- If the calendar type is supplied and is not valid.
- {InvalidParameters}
- If iso is supplied and is not valid.
- {InvalidParameters}
- If i18nDayMapping is supplied and is not valid.
- Returns:
- {String|Number} The day of the week ("Monday" to "Sunday"), or the ISO week date Day-of-Week if iso is true.
- See:
- Zeller's congruence