Spec-Zone.ru › Dart 2

dart:core

метод operator ==

bool operator ==(
  1. 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API