DateTimeFormatter class sealed
A base class for formatters that can format a DateTime into a string.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
format(
DateTime datetime) → String -
Formats the given
datetimeinto a string according to the formatter's configured locale and options. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withTimeZoneLong(
) → ZonedDateTimeFormatter - Returns a ZonedDateTimeFormatter that formats the datetime with a long time zone name.
-
withTimeZoneLongGeneric(
) → ZonedDateTimeFormatter - Returns a ZonedDateTimeFormatter that formats the datetime with a long generic non-location format (e.g. "Pacific Time").
-
withTimeZoneLongOffset(
) → ZonedDateTimeFormatter - Returns a ZonedDateTimeFormatter that formats the datetime with a long localized GMT format (e.g. "GMT-08:00").
-
withTimeZoneShort(
) → ZonedDateTimeFormatter - Returns a ZonedDateTimeFormatter that formats the datetime with a short time zone name.
-
withTimeZoneShortGeneric(
) → ZonedDateTimeFormatter - Returns a ZonedDateTimeFormatter that formats the datetime with a short generic non-location format (e.g. "PT").
-
withTimeZoneShortOffset(
) → ZonedDateTimeFormatter - Returns a ZonedDateTimeFormatter that formats the datetime with a short localized GMT format (e.g. "GMT-8").
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited