getTimeFormatUsesAMPM function

bool getTimeFormatUsesAMPM([
  1. IntlLocale? locale
])

Returns true if locale us AMPM format.

Implementation

bool getTimeFormatUsesAMPM([IntlLocale? locale]) {
  var dateSymbols = getLocaleDateSymbols(locale);
  if (dateSymbols == null) return false;
  var timeFormat = dateSymbols.TIMEFORMATS[0];
  return timeFormat.contains('h') && timeFormat.contains('a');
}