isAtSameMomentAs abstract method
Checks whether this dateTime represents the same moment as another.
Compares this instance with other, which can be either:
- An object implementing GeneralDateTimeInterface, or
- A native DateTime instance.
Returns
trueif both datetime represent the same point in time. Example:
final a = PersianDateTime(1403, 4, 15, 12, 30);
final b = PersianDateTime(1403, 4, 15, 12, 30);
a.isAtSameMomentAs(b); // true
final native = DateTime(2025, 7, 6, 14, 0);
a.isAtSameMomentAs(native); // true or false depending on internal conversion
Implementation
bool isAtSameMomentAs(DateTime other);