HijriDateTime class
An HijriDateTime data.
An object contains the properties about the date time along with hijri data.
final HijriDateTime date = HijriDateTime(1442, 02, 10);
- Annotations
Constructors
- HijriDateTime(int year, int month, int day)
- Creates a instance for HijriDateTime instance with given data.
Properties
- day → int
-
Defines the hijri day value.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- month → int
-
Defines the hijri month value from {1 ... 12}.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeZoneOffset → Duration
-
The time zone offset for the hijri date.
no setter
- weekday → int
-
The weekday for the hijri date.
no setter
- year → int
-
Defines the hijri year value.
final
Methods
-
add(
Duration duration) → HijriDateTime -
Returns a new HijriDateTime instance with
duration
added tothis
. -
compareTo(
HijriDateTime other) → int -
Compares this HijriDateTime object to
other
, returning zero if the values are equal. -
difference(
HijriDateTime other) → Duration -
Returns a Duration with the difference when subtracting
other
fromthis
. -
getNumberOfDatesInMonth(
) → int? - returns the number of dates in the month
-
isAfter(
HijriDateTime other) → bool -
Returns true if
this
occurs afterother
. -
isAtSameMomentAs(
HijriDateTime other) → bool -
Returns true if
this
occurs at the same moment asother
. -
isBefore(
HijriDateTime other) → bool -
Returns true if
this
occurs at the same moment asother
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subtract(
Duration duration) → HijriDateTime -
Returns a new HijriDateTime instance with
duration
subtracted tothis
. -
toDateTime(
) → DateTime -
Returns the gregorian date value of
this
value. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromDateTime(
DateTime date) → HijriDateTime - returns the hijri date from the given date
-
now(
) → HijriDateTime - returns the hijri date value based on the current date