GeneralDateTimeInterface<T> class
abstract
- Implementers
Constructors
Properties
- dayOfYear → int
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLeapYear → bool
-
Check if the year is a leap year according to the calendar
no setter
- julianDay → int
-
Julian Day Number getter
no setter
- microsecondsSinceEpoch → int
-
Microseconds since epoch
no setter
- millisecondsSinceEpoch → int
-
Milliseconds since epoch
no setter
- monthLength → int
-
Get days in the current month according to the calendar
no setter
- name → String
-
The calendar name
for example "Persian" for Persian calendar
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondsSinceEpoch → int
-
Seconds since epoch
no setter
- timeZoneName → String
-
The time zone name.
no setter
- timeZoneOffset → Duration
-
The time zone offset, which is the difference between local time and UTC.
The offset is positive for time zones east of UTC.
no setter
- weekday → int
-
Calculate weekday according to the calendar type
no setter
Methods
-
add(
Duration duration) → T - Add a Duration to the custom date
-
compareTo(
DateTime other) → int - Compares this dateTime instance to another. This method allows comparison between different types that implement GeneralDateTimeInterface as well as native DateTime objects. Returns:
-
difference(
DateTime other) → Duration -
Returns the difference between this dateTime and another.
Computes the Duration between this instance and
other, which can be either: -
isAfter(
DateTime other) → bool -
Checks whether this dateTime occurs after another.
Compares this instance with
other, which can be either: -
isAtSameMomentAs(
DateTime other) → bool -
Checks whether this dateTime represents the same moment as another.
Compares this instance with
other, which can be either: -
isBefore(
DateTime other) → bool -
Checks whether this dateTime occurs before another.
This method compares this instance with
other, which can be either: -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subtract(
Duration duration) → T - Subtract a Duration from the custom date
-
toDateTime(
) → DateTime - Convert T calendar type to DateTime
-
toLocal(
) → T - Convert to local time
-
toString(
) → String -
A string representation of this object.
inherited
-
toUtc(
) → T - Convert to UTC time
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
now<
T extends GeneralDateTimeInterface> () → GeneralDateTimeInterface