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