hrAsString function

String hrAsString (
  1. DateTime time
)

Returns given DateTime's hour as a # String formatted HH (ex. '14').

Implementation

String hrAsString(DateTime time) {
  return formatTime(time: time, format: 'HH');
}