DateTimeFormat.ts overview
Type of a MDateTimeToken (see https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table). Values are dense from 0 so a MDateTimeContext can resolve a token to its MTemplatePlaceholder by plain array indexing.
Exports Grouped by Category
Constructors
make
Constructs a MDateTimeFormat from the given string separators and Token’s
Signature
declare const make: (...parts: Type) => Type
Instances
basicIso8601
MDateTimeFormat instance for the basic ISO 8601 date format (YYYYMMDD, e.g. 20050605).
Signature
declare const basicIso8601: Type
euDate
MDateTimeFormat instance for the European date format with slashes (DD/MM/YYYY, e.g. 05/06/2005).
Signature
declare const euDate: Type
euDotDate
MDateTimeFormat instance for the European date format with dots (DD.MM.YYYY, e.g. 05.06.2005).
Signature
declare const euDotDate: Type
iso8601
MDateTimeFormat instance for the ISO 8601 date format (YYYY-MM-DD, e.g. 2005-06-05).
Signature
declare const iso8601: Type
isoDateTime
MDateTimeFormat instance for the ISO 8601 date-time format without milliseconds (YYYY-MM- DDTHH:mm:ss, e.g. 2005-06-05T14:05:05).
Signature
declare const isoDateTime: Type
isoDateTimeMs
MDateTimeFormat instance for the ISO 8601 date-time format with milliseconds (YYYY-MM- DDTHH:mm:ss.SSS, e.g. 2005-06-05T14:05:05.007).
Signature
declare const isoDateTimeMs: Type
longDate
MDateTimeFormat instance for a long date format (MMMM d, yyyy, e.g. June 5, 2005). The month name is locale-dependent and requires an appropriate MDateTimeContext.
Signature
declare const longDate: Type
shortDate
MDateTimeFormat instance for a short date format (MMM d, yyyy, e.g. Jun 5, 2005). The abbreviated month name is locale-dependent and requires an appropriate MDateTimeContext.
Signature
declare const shortDate: Type
time12h
MDateTimeFormat instance for the 12-hour time format without seconds (KK:mm a, e.g. 02:05 PM).
Signature
declare const time12h: Type
time12hWithSeconds
MDateTimeFormat instance for the 12-hour time format with seconds (KK:mm:ss a, e.g. 02:05:05 PM).
Signature
declare const time12hWithSeconds: Type
time24h
MDateTimeFormat instance for the 24-hour time format without seconds (HH:mm, e.g. 14:05).
Signature
declare const time24h: Type
time24hWithSeconds
MDateTimeFormat instance for the 24-hour time format with seconds (HH:mm:ss, e.g. 14:05:05).
Signature
declare const time24hWithSeconds: Type
usDate
MDateTimeFormat instance for the US date format (MM/DD/YYYY, e.g. 06/05/2005).
Signature
declare const usDate: Type
Models
Type (interface)
Type that represents a MDateTimeFormat. Strings are separators (printed as is); Token’s are placeholders resolved against a MDateTimeContext
Signature
export interface Type extends ReadonlyArray<string | Token> {}