ZonedDateTimeFormatter class sealed

A base class for formatters that can format a DateTime and time zone string into a string.

Example

import 'package:intl4x/datetime_format.dart';
void main() {
  final timeZone = 'Europe/Paris';
  final dateTime = DateTime.parse('2024-07-01T08:50:07');
  final formatter = DateTimeFormat.yearMonthDayTime(
    locale: Locale.parse('en'),
    length: DateTimeLength.long,
  ).withTimeZoneShort();
  print(
    formatter.format(dateTime, timeZone),
  ); // prints 'July 1, 2024 at 8:50:07 AM GMT+2'
}

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 timeZone) String
Formats the given datetime and timeZone into 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

Operators

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