Formatter class final
Provides methods for formatting instances of the Lukashian Calendar classes.
This implementation is not as sophisticated as the Java formatting classes, but should provide sufficient functionality for most use cases.
In Dart, overloads are named methods: formatYear, formatDay, formatDayDefault, formatProportion, formatInstant.
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
-
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
Static Methods
-
formatDay(
Day day, DayFormat? format, [String separator = '-']) → String -
Formats
dayaccording toformat, usingseparatorbetween day and year where applicable. -
formatDayDefault(
Day day) → String -
Formats
daywith DayFormat.yearFirst and'-'as separator. -
formatInstant(
Instant instant, {DayFormat dayFormat = DayFormat.yearFirst, String daySeparator = '-', String formatter(Fraction)?}) → String -
Formats
instantusing formatDay and formatProportion, separated by a space. -
formatProportion(
Fraction proportionOfDay, [String formatter(Fraction)?]) → String -
Formats
proportionOfDayusingformatter, or as four-digit beeps (0–9999) ifformatteris null. -
formatYear(
Year year) → String -
Formats the given
yearby returning its year number as a string.