private static void adjustHourBasedOnAMPM(DateState dateState) {
        /**
         * Adjust 12AM and 1-11PM.
         */
        for (String part : dateState.parts) {
            if (part.endsWith("M")) {
                if (part.endsWith("PM") && dateState.hour > 0 && dateState.hour < 12) {
                    dateState.hour += 12;
                } else if (part.endsWith("AM") && dateState.hour == 12) {
                    dateState.hour = 0;
                }
            }
        }
    }