[−][src]Enum icu::datetime::options::style::Date
Date
represents different length styles DateTime
can be formatted into.
Each length has associated best pattern for it for a given locale.
Examples
use icu_datetime::options::style; let bag = style::Bag { date: Some(style::Date::Long), time: None, preferences: None, };
The available lengths correspond to UTS #35: Unicode LDML 4. Dates
, section 2.4 Element dateFormats
.
Note: The exact result returned from DateTimeFormat
is a subject to change over
time. Formatted result should be treated as opaque and displayed to the user as-is,
and it is strongly recommended to never write tests that expect a particular formatted output.
Variants
Full length, usually with weekday name.
Examples
"Tuesday, January 21, 2020"; // en-US "wtorek, 21 stycznia, 2020"; // pl "الثلاثاء، ٢١ يناير ٢٠٢٠"; // ar "вторник, 21 января 2020 г."; // ru "2020年1月21日火曜日"; // ja
Long length, with wide month name.
Examples
"September 10, 2020"; // en-US "10 września 2020"; // pl "١٠ سبتمبر ٢٠٢٠"; // ar "10 сентября 2020 г."; // ru "2020年9月10日"; // ja
Medium length.
Examples
"Feb 20, 2020"; // en-US "20 lut 2020"; // pl "٢٠/٠٢/٢٠٢٠"; // ar "20 февр. 2020 г."; // ru "2020/02/20"; // ja
Short length, usually with numeric month.
Examples
"1/30/20"; // en-US "30.01.2020"; // pl "٣٠/١/٢٠٢٠"; // ar "30.01.2020"; // ru "2020/01/30"; // ja
Trait Implementations
impl Clone for Date
[src]
impl Copy for Date
[src]
impl Debug for Date
[src]
impl PartialEq<Date> for Date
[src]
impl StructuralPartialEq for Date
[src]
Auto Trait Implementations
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,