Spec-Zone.ru › Dart 1

dart:core

Метод isAtSameMomentAs

bool isAtSameMomentAs(DateTime other)

Возвращает true, если this происходит в тот же момент, что и other.

Сравнение не зависит от того, находится ли время в часовом поясе UTC или в местном часовом поясе.

DateTime berlinWallFell = new DateTime(1989, 11, 9);
DateTime moonLanding    = DateTime.parse("1969-07-20 20:18:00");

assert(berlinWallFell.isAtSameMomentAs(moonLanding) == false);

Исходный код

bool isAtSameMomentAs(DateTime other) {
  return _value == other._value;
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/DateTime/isAtSameMomentAs.html

Spec-Zone.ru

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