constructDateFormatWithPattern method

DateFormat constructDateFormatWithPattern(
  1. Locale? locale,
  2. DateFormatPatternFactory patternFactory
)

Construct a new DateFormat with pre-defined format factory Function like below:

final preDefDFStr = IntlScriptRecognizer()
  .constructDateFormatWithPattern(const Locale("zh", "Hant"), DateFormat.yMMMMd)
  .format(DateTime.now())

Implementation

DateFormat constructDateFormatWithPattern(
    Locale? locale, DateFormatPatternFactory patternFactory) {
  return patternFactory(resolve(locale));
}