pub struct Locale {
pub months: [String; 12],
pub months_standalone: [String; 12],
pub months_short: [String; 12],
pub weekdays: [String; 7],
pub weekdays_short: [String; 7],
pub am_pm: [String; 2],
pub first_weekday: Weekday,
}Expand description
The names dates are written with in a locale.
Fields§
§months: [String; 12]January first, as %B writes them: the form used inside a date,
genitive in Polish, Russian, Ukrainian, Czech and others, so a
calendar’s header uses months_standalone.
months_standalone: [String; 12]January first, as a month is named on its own, from glibc’s
alt_mon; the same as months in a locale without it.
months_short: [String; 12]January first, as %b writes them.
weekdays: [String; 7]Monday first, as %A writes them.
weekdays_short: [String; 7]Monday first, as %a writes them.
am_pm: [String; 2]Before and after noon, as %p writes them. Empty in a locale that
writes 24-hour time.
first_weekday: WeekdayThe day a calendar’s week starts on.
Implementations§
Source§impl Locale
impl Locale
Sourcepub fn strftime(&self, time: &Zoned, format: &str) -> String
pub fn strftime(&self, time: &Zoned, format: &str) -> String
time written as format says, as jiff’s strftime does, with
%a, %A, %b, %h, %B and %p in this locale. Before those,
^ uppercases the name, # changes its case as glibc’s does, and
other flags and a width are ignored. A format jiff can’t write is
logged and gives an empty string.
Trait Implementations§
impl Eq for Locale
impl StructuralPartialEq for Locale
Auto Trait Implementations§
impl Forget for Locale
impl Freeze for Locale
impl Move for Locale
impl RefUnwindSafe for Locale
impl Send for Locale
impl Sync for Locale
impl Unpin for Locale
impl UnsafeUnpin for Locale
impl UnwindSafe for Locale
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
Source§type NoneType = T
type NoneType = T
NoneValue::null_value produces.