Class Index | File Index

Classes


Class PersianAlgoCal


Extends Calendar.
Construct a new Persian algorithmic calendar object. This class encodes information about a Persian algorithmic calendar.


Defined in: ilib-full-dyn.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Return the equivalent year in the 2820 year cycle that begins on Far 1, 474.
 
getMonLength(month, year)
Return the number of days in a particular month in a particular year.
 
Return the number of months in the given year.
 
Return the type of this calendar.
 
isLeapYear(year)
Return true if the given year is a leap year in the Persian calendar.
<deprecated>  
newDateInstance(options)
Return a date instance for this calendar type using the given options.
Class Detail
PersianAlgoCal()
Method Detail
{number} equivalentCycleYear(year)
Return the equivalent year in the 2820 year cycle that begins on Far 1, 474. This particular cycle obeys the cycle-of-years formula whereas the others do not specifically. This cycle can be used as a proxy for other years outside of the cycle by shifting them into the cycle.
Parameters:
{number} year
year to find the equivalent cycle year for
Returns:
{number} the equivalent cycle year

{number} getMonLength(month, year)
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:
{number} month
the month for which the length is sought
{number} year
the year within which that month can be found
Returns:
{number} 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 some 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:
{number} year
a year for which the number of months is sought
Returns:
{number} The number of months in the given year

{string} getType()
Return the type of this calendar.
Returns:
{string} the name of the type of this calendar

{boolean} isLeapYear(year)
Return true if the given year is a leap year in the Persian calendar. The year parameter may be given as a number, or as a PersAlgoDate object.
Parameters:
{number} year
the year for which the leap year information is being sought
Returns:
{boolean} true if the given year is a leap year

<deprecated> {IDate} newDateInstance(options)
Return a date instance for this calendar type using the given options.
Parameters:
{Object} options
options controlling the construction of the date instance
Deprecated:
Since 11.0.5. Use DateFactory({calendar: cal.getType(), ...}) instead
Returns:
{IDate} a date appropriate for this calendar type

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jun 14 2017 00:48:37 GMT-0700 (PDT)