hourOf12HourClock property

int hourOf12HourClock

Gets the hour of the half-day of this local time, in the range 1 to 12 inclusive.

see: https://en.wikipedia.org/wiki/12-hour_clock

Implementation

int get hourOf12HourClock {
  var hod = hourOfDay % 12;
  return hod == 0 ? 12 : hod;
}