Provide bsl::formatter specialization for bdlt::Datetime.
Outline
Purpose
Provide bsl::formatter specialization for bdlt::Datetime.
Classes
- See also
- bdlt_datetime, bdlt_dateformatter, bdlt_timeformatter, bslfmt_formatter
Description
This component provides bdlt::DatetimeFormatter and a specialization of bsl::formatter that allow bsl::format to output values of bdlt::Datetime.
The formatter interprets the following modifier:
- ',' (comma) - the decimal point when displaying seconds is shown as a comma rather than a period.
The formatter supports various date and format specifiers including:
- Year: 'Y' (4-digit), 'y' (2-digit), 'C' (century)
- Month: 'm' (numeric), 'b'/'h' (abbreviated name)
- Day: 'd' (zero-padded), 'e' (space-padded)
- Day of week: 'a' (abbreviated name), 'u'/'w' (numeric)
- Day of year: 'j' (numeric)
- Hour: 'H' (2 digit) "00" - "24"
- Hour: 'I' (2 digit) "01" - "12"
- AM/PM: 'p' - "AM" or "PM"
- Minute: 'M' (2 digits) "00" - "59"
- Second: 'S' (2 digits) "00" - "59"
- Composite: 'T' (time in default format), 'D' (date in default format), 'F' (date in ISO 8601 format)
- Composite: "{}" (
Datetime in default format), or 'i' (Datetime in ISO 8601 format)