registerLocale static method

void registerLocale(
  1. String locale,
  2. DateFormatterLocale localeInstance
)

Override and add a new locale to the supported locales.

The locale is used for both pattern and relative formatting.

Implementation

static void registerLocale(
  String locale,
  DateFormatterLocale localeInstance,
) {
  _supportedLocales[_canonicalize(locale)] = localeInstance;
}