format method

List<int> format()

Segments a duration by hours, minutes and seconds.

Implementation

List<int> format() {
  final int hours = (inHours / 60).floor();
  final int minutes = inMinutes - (hours * 60);
  final int seconds = inSeconds - (hours * 60 * 60) - (minutes * 60);

  return [hours, minutes, seconds];
}