Spec-Zone.ru › Dart 2

dart:core

Метод оператор ==

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.18.5/dart-core/DateTime/operator_equals.html

Spec-Zone.ru

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