DateTimeFormat class

DateTime formatting, for example:

final date = DateTime.utc(2021, 12, 17, 4, 0, 42);
Intl(locale: const Locale(language: 'fr'))
    .datetimeFormat(const DateTimeFormatOptions(
      hour: TimeRepresentation.numeric,
      hourCycle: HourCycle.h12,
      dayPeriod: DayPeriod.narrow,
      timeZone: 'UTC',
    ))
    .format(date); // Output: '4 mat.'

Constructors

DateTimeFormat(DateTimeFormatImpl _impl)

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
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