Spec-Zone.ru › Dart 2

dart:core

inHours property

int inHours

The number of entire hours spanned by this Duration.

The returned value can be greater than 23. For example, a duration of four days and three hours has 99 entire hours.

const duration = Duration(days: 4, hours: 3);
print(duration.inHours); // 99

Implementation

int get inHours => _duration ~/ Duration.microsecondsPerHour;

© 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/Duration/inHours.html

Spec-Zone.ru

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