createWithInvariantCulture static method

ZonedDateTimePattern createWithInvariantCulture(
  1. String patternText, [
  2. DateTimeZoneProvider? zoneProvider
])

Creates a pattern for the given pattern text and the specified or default time zone provider, using a strict resolver, the invariant culture, and a default template value of midnight January 1st 2000 UTC.

The resolver is only used if the pattern text doesn't include an offset. 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
  • zoneProvider: Time zone provider, used when parsing text which contains a time zone identifier. If null, defaults to DateTimeZoneProviders.defaultProvider, which may also be null.

Returns: A pattern for parsing and formatting zoned date/times.

Implementation

static ZonedDateTimePattern createWithInvariantCulture(String patternText, [DateTimeZoneProvider? zoneProvider]) =>
    _create(patternText, TimeMachineFormatInfo.invariantInfo, Resolvers.strictResolver, zoneProvider ?? DateTimeZoneProviders.defaultProvider, ZonedDateTimePatterns.defaultTemplateValue);