метод operator ==
- Object other
override
Возвращает true, если other является объектом DateTime в тот же момент времени и в том же часовом поясе (UTC или местном).
final dDayUtc = DateTime.utc(1944, 6, 6); final dDayLocal = dDayUtc.toLocal(); // These two dates are at the same moment, but are in different zones. assert(dDayUtc != dDayLocal); print(dDayUtc != dDayLocal); // true
См. isAtSameMomentAs, чтобы сравнить моменты времени независимо от часовых поясов.
Реализация
external bool operator ==(Object other);
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-core/DateTime/operator_equals.html