UpdatedLocale class

A wrapper locale that overrides specific properties of a base locale.

Inheritance
Available extensions

Constructors

UpdatedLocale(HoraLocale _base, {String? code, List<String>? months, List<String>? monthsShort, List<String>? weekdays, List<String>? weekdaysShort, List<String>? weekdaysMin, int? weekStart, int? yearStart, String? invalidDate, HoraFormats? formats, HoraRelativeTime? relativeTime, String ordinal(int n, String? unit)?, String meridiem(int hour, int minute, {bool lowercase})?})
const

Properties

code String
The locale code (e.g., 'en', 'zh-cn', 'ja').
no setteroverride
formats HoraFormats
Localized date formats.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
invalidDate String
Invalid date string.
no setteroverride
months List<String>
Full month names (January, February, ...).
no setteroverride
monthsShort List<String>
Abbreviated month names (Jan, Feb, ...).
no setteroverride
relativeTime HoraRelativeTime
Relative time expressions.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
weekdays List<String>
Full weekday names starting from Sunday.
no setteroverride
weekdaysMin List<String>
Minimum weekday names (Su, Mo, ...).
no setteroverride
weekdaysShort List<String>
Short weekday names (Sun, Mon, ...).
no setteroverride
weekStart int
First day of week.
no setteroverride
yearStart int
Minimum days in the first week of year.
no setteroverride

Methods

meridiem(int hour, int minute, {bool lowercase = false}) String
Returns the meridiem indicator (AM/PM or locale equivalent).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ordinal(int n, [String? unit]) String
Returns the ordinal suffix for a number (1st, 2nd, 3rd, etc.).
override
toString() String
A string representation of this object.
inherited
update({String? code, List<String>? months, List<String>? monthsShort, List<String>? weekdays, List<String>? weekdaysShort, List<String>? weekdaysMin, int? weekStart, int? yearStart, String? invalidDate, HoraFormats? formats, HoraRelativeTime? relativeTime, String ordinal(int n, String? unit)?, String meridiem(int hour, int minute, {bool lowercase})?}) UpdatedLocale

Available on HoraLocale, provided by the UpdateLocaleExtension extension

Creates a new locale with updated properties.
updateFormats({String? lt, String? lts, String? l, String? ll, String? lll, String? llll}) UpdatedLocale

Available on HoraLocale, provided by the UpdateLocaleExtension extension

Creates a new locale with updated formats.
updateRelativeTime({String? future, String? past, String? s, String? m, String? mm, String? h, String? hh, String? d, String? dd, String? w, String? ww, String? mo, String? mos, String? y, String? yy}) UpdatedLocale

Available on HoraLocale, provided by the UpdateLocaleExtension extension

Creates a new locale with updated relative time.

Operators

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