DurationLocale class abstract

Interface to print time units for different locale

Implementers

Constructors

DurationLocale()
const

Properties

dayPattern RegExp
A pattern to match days for this locale.
no setter
defaultSpacer String
no setter
hashCode int
The hash code for this object.
no setterinherited
hourPattern RegExp
A pattern to match hours for this locale.
no setter
microsecondPattern RegExp
A pattern to match microseconds for this locale.
no setter
millisecondPattern RegExp
A pattern to match milliseconds for this locale.
no setter
minutePattern RegExp
A pattern to match minutes for this locale.
no setter
monthPattern RegExp
A pattern to match months for this locale.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondPattern RegExp
A pattern to match seconds for this locale.
no setter
weekPattern RegExp
A pattern to match weeks for this locale.
no setter
yearPattern RegExp
A pattern to match years for this locale.
no setter

Methods

day(int amount, [bool abbreviated = true]) String
Print amount day for the corresponding locale. The unit is abbreviated if abbreviated is set to true.
hour(int amount, [bool abbreviated = true]) String
Print amount hour for the corresponding locale. The unit is abbreviated if abbreviated is set to true.
inUnit(DurationTersity unit, int amount, [bool abbreviated = true]) String
microseconds(int amount, [bool abbreviated = true]) String
Print amount microseconds for the corresponding locale. The unit is abbreviated if abbreviated is set to true.
millisecond(int amount, [bool abbreviated = true]) String
Print amount millisecond for the corresponding locale. The unit is abbreviated if abbreviated is set to true.
minute(int amount, [bool abbreviated = true]) String
Print amount minute for the corresponding locale. The unit is abbreviated if abbreviated is set to true.
month(int amount, [bool abbreviated = true]) String
Print amount month for the corresponding locale. The unit is abbreviated if abbreviated is set to true.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
second(int amount, [bool abbreviated = true]) String
Print amount second for the corresponding locale. The unit is abbreviated if abbreviated is set to true.
toString() String
A string representation of this object.
inherited
week(int amount, [bool abbreviated = true]) String
Print amount week for the corresponding locale. The unit is abbreviated if abbreviated is set to true.
year(int amount, [bool abbreviated = true]) String
Print amount years for the corresponding locale. The unit is abbreviated if abbreviated is set to true.

Operators

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

Static Methods

fromLanguageCode(String languageCode) DurationLocale?