ILibDateFmt class

Formats dates and times for a locale, calendar, and time zone.

Configure it with an ILibDateFmtOptions and then call format with a date. The formatter is immutable once created and can format many dates with the same settings. A custom ILibDateFmtOptions.template overrides the locale's default format.

Constructors

ILibDateFmt(ILibDateFmtOptions options)
Create a formatter from options. Unspecified options fall back to the locale's defaults.

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(ILibDate date) String
Format date according to this formatter's settings and return the resulting string. date may be any ILibDate, including an ILibDateOptions describing the date to format.
getCalendar() ILibCalendar
The calendar used to format dates and times.
getClock() int
The clock convention in use: 12 or 24 (hour).
getDateComponentOrder() String
The order of the day/month/year components in this locale's date format, as a string of d, m, and y (e.g. 'dmy', 'mdy').
getMeridiemsRange() List<MeridiemsInfo>
The ordered ranges of meridiems (e.g. AM/PM) this formatter recognizes, which vary by the locale's meridiems style.
getTemplate() String
The template string used to format dates and times.
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