Enum icu_datetime::options::length::Date [−][src]
pub enum Date { Full, Long, Medium, Short, }
Represents different lengths a DateTimeInput
implementer can be formatted into.
Each length has associated best pattern for it for a given locale.
Examples
use icu::datetime::options::length; let bag = length::Bag { date: Some(length::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<'de> Deserialize<'de> for Date
[src]
impl<'de> Deserialize<'de> for Date
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl StructuralPartialEq for Date
[src]
impl StructuralPartialEq for Date
[src]Auto Trait Implementations
impl RefUnwindSafe for Date
impl RefUnwindSafe for Date
impl UnwindSafe for Date
impl UnwindSafe for Date
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<T> ErasedDataStruct for T where
T: Clone + Debug + Any,
[src]
impl<T> ErasedDataStruct for T where
T: Clone + Debug + Any,
[src]