createWithCulture static method
- String patternText,
- Culture culture, [
- ZoneLocalMappingResolver? resolver,
- DateTimeZoneProvider? zoneProvider,
- ZonedDateTime? templateValue,
Creates a pattern for the given pattern text, culture, resolver, specified or default time zone provider, and the specified or default template value.
todo: we need one
See the user guide for the available pattern text options.
If the resulting zoneProvider
is null, the resulting pattern can be used for formatting
but not parsing.
-
patternText
: Pattern text to create the pattern for -
culture
: The culture to use in the pattern -
resolver
: Resolver to apply when mapping local date/time values into the zone. -
zoneProvider
: Time zone provider or default zone provider, used when parsing text which contains a time zone identifier. If null, defaults to DateTimeZoneProviders.defaultProvider, which may also be null. -
templateValue
: Template value to use for unspecified fields Returns: A pattern for parsing and formatting zoned date/times. -
InvalidPatternError: The pattern text was invalid.
Implementation
static ZonedDateTimePattern createWithCulture(String patternText, Culture culture,
[ZoneLocalMappingResolver? resolver, DateTimeZoneProvider? zoneProvider, ZonedDateTime? templateValue]) =>
_create(patternText, TimeMachineFormatInfo.getFormatInfo(culture), resolver ?? Resolvers.strictResolver,
zoneProvider ?? DateTimeZoneProviders.defaultProvider, templateValue ?? ZonedDateTimePatterns.defaultTemplateValue);