DateTimeLocale

How to format locale-specific date/time output

Members

Functions

abbreviatedDayName
cstring abbreviatedDayName(Calendar.DayOfWeek dayOfWeek)

Return a short day name

abbreviatedMonthName
cstring abbreviatedMonthName(int month)

Return a short month name

calendar
Calendar calendar()

Return the assigned Calendar instance, using Gregorian as the default

dayName
cstring dayName(Calendar.DayOfWeek dayOfWeek)

Return a long day name

format
char[] format(char[] output, Time dateTime, cstring layout)
void format(size_t delegate(cstring) output, Time dateTime, cstring layout)

Format the given Time value into the provided output, using the specified layout. The layout can be a generic variant or a custom one, where generics are indicated via a single character:

monthName
cstring monthName(int month)

Return a long month name

Static functions

create
DateTimeLocale create()

Create and populate an instance via O/S configuration for the current user

generic
DateTimeLocale* generic()

Return a generic English/US instance

Static variables

rfc1123Pattern
auto rfc1123Pattern;
Undocumented in source.
sortableDateTimePattern
auto sortableDateTimePattern;
Undocumented in source.
universalSortableDateTimePattern
auto universalSortableDateTimePattern;
abbreviatedDayNames
cstring[] abbreviatedDayNames;
abbreviatedMonthNames
cstring[] abbreviatedMonthNames;
Undocumented in source.

Variables

amDesignator
cstring amDesignator;
Undocumented in source.
assignedCalendar
Calendar assignedCalendar;
dateSeparator
cstring dateSeparator;
Undocumented in source.
dayNames
cstring[] dayNames;
fullDateTimePattern
cstring fullDateTimePattern;
generalLongTimePattern
cstring generalLongTimePattern;
generalShortTimePattern
cstring generalShortTimePattern;
longDatePattern
cstring longDatePattern;
longTimePattern
cstring longTimePattern;
monthDayPattern
cstring monthDayPattern;
monthNames
cstring[] monthNames;
pmDesignator
cstring pmDesignator;
Undocumented in source.
shortDatePattern
cstring shortDatePattern;
shortTimePattern
cstring shortTimePattern;
Undocumented in source.
timeSeparator
cstring timeSeparator;
yearMonthPattern
cstring yearMonthPattern;
Undocumented in source.

Meta