InstantPattern class

Represents a pattern for parsing and formatting Instant 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
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

appendFormat(Instant value, StringBuffer builder) StringBuffer
Formats the given value as text according to the rules of this pattern, appending to the given StringBuilder.
override
format(Instant value) String
Formats the given instant 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<Instant>
Parses the given text value according to the rules of this pattern.
override
toString() String
A string representation of this object.
inherited
withCulture(Culture culture) InstantPattern
Creates a pattern for the same original pattern text as this pattern, but with the specified culture.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

extendedIso InstantPattern
Gets an invariant instant pattern which is ISO-8601 compatible, providing up to 9 decimal places of sub-second accuracy. (These digits are omitted when unnecessary.) This corresponds to the text pattern "uuuu'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFFFF'Z'".
no setter
general InstantPattern
Gets the general pattern, which always uses an invariant culture. The general pattern represents an instant as a UTC date/time in ISO-8601 style "uuuu-MM-ddTHH:mm:ss'Z'".
no setter

Static Methods

createWithCulture(String patternText, Culture culture) InstantPattern
Creates a pattern for the given pattern text and culture.
createWithCurrentCulture(String patternText) InstantPattern
Creates a pattern for the given pattern text in the current thread's current culture.
createWithInvariantCulture(String patternText) InstantPattern
Creates a pattern for the given pattern text in the invariant culture.