IranianHijri class
The lunar Hijri calendar as Iran's official calendar uses it.
Month starts from Muharram 1265 (1848) to Shawwal 1448 (Jalali 1405/12) come from the official record: the calendars of the University of Tehran's Calendar Center from 1423 (2002) on, and historical sources before that, as collected by the qamari project. Where the crescent was seen on a different day than the calendar had predicted, the day it was seen counts.
Later months start the day after the evening their new crescent can be seen in Iran. The crescent is predicted from the positions of the Sun and the Moon (truncated Meeus series) with Yallop's criterion at the optical-aid limit (q >= -0.232), checked at several Iranian cities, and a few months already published on time.ir are fixed by a table. monthStarts add announcements of your own.
The prediction is a calculation, not an announcement: a month can still move by a day when the crescent is or is not actually seen.
Constructors
-
IranianHijri({Map<
(int, int), PersianDate> monthStarts = const {}}) -
Creates the calendar.
monthStartsmaps a Hijri(year, month)to the Jalali day it starts on, for months where an announcement differs from the calculation; it wins over everything else.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
monthStarts
→ Map<
(int, int), PersianDate> -
Announced month starts given to the constructor.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
date(
int year, int month, int day) → HijriDate - Creates a Hijri date on this calendar.
-
fromDateTime(
DateTime dateTime) → HijriDate -
The Hijri date of the calendar day of
dateTimeon this calendar; the time of day is ignored. -
fromPersianDate(
PersianDate date) → HijriDate -
The Hijri date of
dateon this calendar; the time of day is ignored. -
monthLength(
int year, int month) → int -
Number of days in
month(1 to 12) of Hijriyear, 29 or 30. -
monthStart(
int year, int month) → PersianDate -
Jalali day
month(1 to 12) of Hijriyearstarts on. -
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 Properties
- official → IranianHijri
-
The calendar with the built-in table and no announcements of your own.
HijriDate uses it.
final