constructDateFormatWithPattern method
DateFormat
constructDateFormatWithPattern(
- Locale? locale,
- 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));
}