Module pattern

Source
Expand description

Lower-level, power-user APIs for formatting datetimes with pattern strings.

❗ This module forgoes most internationalization functionality of the datetime crate. It assumes that the pattern is already localized for the customer’s locale. Most clients should use DateTimeFormatter instead of directly formatting with patterns.

Structs§

DateTimeNames
A low-level type that formats datetime patterns with localized names. The calendar is chosen in the constructor at runtime.
DateTimePattern
A pattern for formatting a datetime in a calendar.
DateTimePatternFormatter
A formatter for a specific DateTimePattern.
ErrorField
The specific field for which an error occurred.
FixedCalendarDateTimeNames
A low-level type that formats datetime patterns with localized names. The calendar should be chosen at compile time.
FormattedDateTimePattern
A pattern that has been interpolated and implements TryWriteable.
UnsupportedCalendarError
Error returned from constructors that map from AnyCalendar to a formatter.

Enums§

DayPeriodNameLength
Choices for loading day period names.
FormattedDateTimePatternError
Error for the [TryWriteable] implementation of FormattedDateTimePattern.
MonthNameLength
Choices for loading month names.
PatternLoadError
Error returned from FixedCalendarDateTimeNames’s pattern load methods.
WeekdayNameLength
Choices for loading weekday names.
YearNameLength
Choices for loading year names.