pub enum FormatDirective {
Show 18 variants
Year4,
Year2,
MonthNumber,
DayOfMonth,
DayOfMonthSpaced,
Hour24,
Hour12,
Minute,
Second,
Fraction,
Meridiem,
DayOfYear,
MonthAbbrev,
MonthName,
WeekdayAbbrev,
WeekdayName,
Offset,
ZoneName,
}Expand description
One thing a format says, in the strftime family’s own vocabulary.
The list is what the family agrees on. A directive outside it is refused by name when the design is read, rather than being passed to an engine that would either ignore it or read it as something else.
Variants§
Year4
%Y — the year in four digits.
Year2
%y — the year in two digits.
MonthNumber
%m — the month as a number.
DayOfMonth
%d — the day of the month, zero-padded or not.
DayOfMonthSpaced
%e — the day of the month, space-padded or not.
Hour24
%H — the hour on a twenty-four hour clock.
Hour12
%I — the hour on a twelve hour clock, read with Self::Meridiem.
Minute
%M — the minute.
Second
%S — the second.
Fraction
%f — the fraction of a second.
Meridiem
%p — AM or PM.
DayOfYear
%j — the day of the year.
MonthAbbrev
%b — the month’s name, abbreviated.
MonthName
%B — the month’s name in full.
WeekdayAbbrev
%a — the weekday’s name, abbreviated.
WeekdayName
%A — the weekday’s name in full.
Offset
%z — the offset from UTC, as +0000 or +00:00.
ZoneName
%Z — the time zone’s name.
Implementations§
Source§impl FormatDirective
impl FormatDirective
Sourcepub fn names_a_zone(self) -> bool
pub fn names_a_zone(self) -> bool
True where this directive says something about a moment within a day — an offset or a zone name, which a column holding a day alone has nowhere to put.