ZonedDateTimePattern class
Represents a pattern for parsing and formatting ZonedDateTime values.
- Implemented types
- Annotations
-
- @immutable
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- patternText → String
-
Gets the pattern text for this pattern, as supplied on creation.
final
- resolver → ZoneLocalMappingResolver?
-
Gets the resolver which is used to map local date/times to zoned date/times,
handling skipped and ambiguous times appropriately (where the offset isn't specified in the pattern).
This may be null, in which case the pattern can only be used for formatting (not parsing).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- templateValue → ZonedDateTime
-
Gets the value used as a template for parsing: any field values unspecified
in the pattern are taken from the template.
final
- zoneProvider → DateTimeZoneProvider?
-
Gets the provider which is used to look up time zones when parsing a pattern
which contains a time zone identifier. This may be null, in which case the pattern can
only be used for formatting (not parsing).
final
Methods
-
appendFormat(
ZonedDateTime value, StringBuffer builder) → StringBuffer -
Formats the given value as text according to the rules of this pattern,
appending to the given
StringBuilder
.override -
format(
ZonedDateTime value) → String -
Formats the given zoned date/time as text according to the rules of this pattern.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
String text) → ParseResult< ZonedDateTime> -
Parses the given text value according to the rules of this pattern.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
withCalendar(
CalendarSystem calendar) → ZonedDateTimePattern - Creates a pattern like this one, but with the template value modified to use the specified calendar system.
-
withCulture(
Culture culture) → ZonedDateTimePattern - Creates a pattern for the same original pattern text as this pattern, but with the specified culture.
-
withDefaultZoneProvider(
) → ZonedDateTimePattern - Creates a pattern for the same original pattern text as this pattern, but with the default time zone provider.
-
withPatternText(
String patternText) → ZonedDateTimePattern - Creates a pattern for the same original localization information as this pattern, but with the specified pattern text.
-
withResolver(
ZoneLocalMappingResolver? resolver) → ZonedDateTimePattern - Creates a pattern for the same original pattern text as this pattern, but with the specified resolver.
-
withTemplateValue(
ZonedDateTime newTemplateValue) → ZonedDateTimePattern - Creates a pattern like this one, but with the specified template value.
-
withZoneProvider(
DateTimeZoneProvider? newZoneProvider) → ZonedDateTimePattern - Creates a pattern for the same original pattern text as this pattern, but with the specified time zone provider.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- extendedFormatOnlyIso → ZonedDateTimePattern
-
Returns an invariant zoned date/time pattern based on ISO-8601 (down to the nanosecond) including offset from UTC and zone ID.
It corresponds to a custom pattern of "uuuu'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFFFF z '('o<g>')'" and is available
as the 'F' standard pattern.
no setter
- generalFormatOnlyIso → ZonedDateTimePattern
-
Gets an zoned local date/time pattern based on ISO-8601 (down to the second) including offset from UTC and zone ID.
It corresponds to a custom pattern of "uuuu'-'MM'-'dd'T'HH':'mm':'ss z '('o<g>')'" and is available
as the 'G' standard pattern.
no setter
Static Methods
-
createWithCulture(
String patternText, Culture culture, [ZoneLocalMappingResolver? resolver, DateTimeZoneProvider? zoneProvider, ZonedDateTime? templateValue]) → ZonedDateTimePattern - Creates a pattern for the given pattern text, culture, resolver, specified or default time zone provider, and the specified or default template value.
-
createWithCurrentCulture(
String patternText, [DateTimeZoneProvider? zoneProvider]) → ZonedDateTimePattern - Creates a pattern for the given pattern text and the specified or default time zone provider, using a strict resolver, the current culture, and a default template value of midnight January 1st 2000 UTC.
-
createWithInvariantCulture(
String patternText, [DateTimeZoneProvider? zoneProvider]) → ZonedDateTimePattern - 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.