@serenity-is/corelib / DateFormat
Interface: DateFormat
Defined in: src/base/formatting.ts:28
Locale settings for date/time formatting, mirroring .NET DateTimeFormatInfo.
Remarks
Consumed by formatDate and parseDate via Culture.
Extended by
Properties
amDesignator?
optionalamDesignator:string
Defined in: src/base/formatting.ts:38
Designator for AM hours (used with t/tt tokens).
Default Value
"AM".
dateFormat?
optionaldateFormat:string
Defined in: src/base/formatting.ts:32
Default date-only format string (e.g. "dd/MM/yyyy").
dateOrder?
optionaldateOrder:string
Defined in: src/base/formatting.ts:34
Token order for parsing ambiguous numeric dates: "dmy", "mdy", or "ymd".
dateSeparator?
optionaldateSeparator:string
Defined in: src/base/formatting.ts:30
Character separating date parts (e.g. "/" or ".").
dateTimeFormat?
optionaldateTimeFormat:string
Defined in: src/base/formatting.ts:36
Default combined date+time format string (e.g. "dd/MM/yyyy HH:mm:ss").
dayNames?
optionaldayNames:string[]
Defined in: src/base/formatting.ts:46
Full day names starting with Sunday — 7 entries.
firstDayOfWeek?
optionalfirstDayOfWeek:number
Defined in: src/base/formatting.ts:44
Index of the first day of the week (0 = Sunday, 1 = Monday).
minimizedDayNames?
optionalminimizedDayNames:string[]
Defined in: src/base/formatting.ts:50
Two-letter day names (e.g. "Su", "Mo"). — 7 entries.
monthGenitiveNames?
optionalmonthGenitiveNames:string[]
Defined in: src/base/formatting.ts:60
Full month names in the genitive case, used by formatDate instead of monthNames when the
format also has a day number (d or dd), as .NET does, e.g. "17 listopada" instead of "17 listopad" in
Polish. Not set when they are the same as the month names, which they are in most languages.
monthNames?
optionalmonthNames:string[]
Defined in: src/base/formatting.ts:52
Full month names starting with January — 12 entries plus a trailing empty slot for compatibility.
pmDesignator?
optionalpmDesignator:string
Defined in: src/base/formatting.ts:40
Designator for PM hours (used with t/tt tokens).
Default Value
"PM".
shortDayNames?
optionalshortDayNames:string[]
Defined in: src/base/formatting.ts:48
Abbreviated day names (e.g. "Sun", "Mon"). — 7 entries.
shortMonthGenitiveNames?
optionalshortMonthGenitiveNames:string[]
Defined in: src/base/formatting.ts:62
Abbreviated month names in the genitive case, see monthGenitiveNames. Not set when they are the same as shortMonthNames.
shortMonthNames?
optionalshortMonthNames:string[]
Defined in: src/base/formatting.ts:54
Abbreviated month names (e.g. "Jan", "Feb"). — 12 entries plus a trailing empty slot.
timeSeparator?
optionaltimeSeparator:string
Defined in: src/base/formatting.ts:42
Character separating time parts.
Default Value
":".