normalizeHour static method

int normalizeHour(
  1. int hour,
  2. bool isAmPm
)

Implementation

static int normalizeHour(int hour, bool isAmPm) {
  if (!isAmPm) return hour;
  if (hour == 12) return 0;
  return hour;
}