DateFormatNames class

Month and weekday names used by the medium/long presets, injectable so the presets can render in any language without a locale database.

months and monthsShort are indexed by DateTime.month - 1 (Jan = 0). weekdays is indexed by DateTime.weekday - 1 (Monday = 0), matching Dart's DateTime.weekday range of 1 (Mon) .. 7 (Sun).

Annotations

Constructors

DateFormatNames({required List<String> months, required List<String> monthsShort, required List<String> weekdays})
Creates a name set. months and monthsShort must each have 12 entries and weekdays 7, so every month/weekday index is in range — a List length cannot be asserted in a const constructor, so this is a documented contract; a shorter list throws RangeError from the presets. Audited: 2026-06-12 11:26 EDT
const

Properties

hashCode int
The hash code for this object.
no setterinherited
months List<String>
Full month names, January..December (index = month - 1).
final
monthsShort List<String>
Abbreviated month names, Jan..Dec (index = month - 1).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
weekdays List<String>
Full weekday names, Monday..Sunday (index = weekday - 1).
final

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

Constants

english → const DateFormatNames
English default used when no localized names are supplied. Audited: 2026-06-12 11:26 EDT