ILibCalendar class abstract

Abstract calendar type used to calculate date and time information.

Use ILibCalendar.fromLocale to get the calendar for a locale, or pass a type string to the default factory (e.g. ILibCalendar('islamic')). Concrete subclasses implement the calendar-specific arithmetic.

Implementers

Constructors

ILibCalendar([String? type])
Create a calendar by type name (e.g. 'gregorian', 'islamic'). Defaults to 'gregorian' when type is omitted.
factory
ILibCalendar.fromLocale(String locale)
Create the calendar commonly used in the given locale. Falls back to the locale's default calendar, which is gregorian when the locale data specifies none.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getMonLength(int month, int year) int
Return the number of days in month of the given year.
getNumMonths(int year) int
Return the number of months in the given year.
getType() String
Return the calendar type identifier (e.g. 'gregorian', 'islamic').
isLeapYear(int year) bool
Return true if year is a leap year in this calendar.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getCalendars() List<String>
Return the list of calendar type names supported by this library.