formatHour function

String formatHour(
  1. int hour
)

Implementation

String formatHour(int hour) {
  if (hour > 12) {
    return formatNumber(hour - 12);
  } else {
    return formatNumber(hour);
  }
}