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;