createWithCulture static method
LocalDateTimePattern
createWithCulture(
- String patternText,
- Culture culture, [
- LocalDateTime? templateValue
Creates a pattern for the given pattern text, culture, and template value.
todo: we need one See the user guide for the available pattern text options.
patternText
: Pattern text to create the pattern forculture
: The culture to use in the patterntemplateValue
: Template value to use for unspecified fields. Defaults to a template value of midnight on 2000-01-01.
Returns: A pattern for parsing and formatting local date/times.
- InvalidPatternError: The pattern text was invalid.
Implementation
static LocalDateTimePattern createWithCulture(String patternText, Culture culture, [LocalDateTime? templateValue]) =>
_create(patternText, TimeMachineFormatInfo.getFormatInfo(culture), templateValue ?? LocalDateTimePatterns.defaultTemplateValue);