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 day according to format, using separator between day and year where applicable.
formatDayDefault(Day day) String
Formats day with DayFormat.yearFirst and '-' as separator.
formatInstant(Instant instant, {DayFormat dayFormat = DayFormat.yearFirst, String daySeparator = '-', String formatter(Fraction)?}) String
Formats instant using formatDay and formatProportion, separated by a space.
formatProportion(Fraction proportionOfDay, [String formatter(Fraction)?]) String
Formats proportionOfDay using formatter, or as four-digit beeps (0–9999) if formatter is null.
formatYear(Year year) String
Formats the given year by returning its year number as a string.