In some cases, the strings returned from amText() and
pmText() may differ in case to the provided format
in the timeFormatToInputMask method.
This results in an incorrect mask string being provided
to the line edit control.
Instead, detect if the format string uses upper or lower
case for the AM/PM specification, and use this to convert
the am/pm text strings to a consistent case.
BUG: 361764