[−][src]Enum chrono::format::Numeric  
Numeric item types. They have associated formatting width (FW) and parsing width (PW).
The formatting width is the minimal width to be formatted.
If the number is too short, and the padding is not Pad::None,
then it is left-padded.
If the number is too long or (in some cases) negative, it is printed as is.
The parsing width is the maximal width to be scanned. The parser only tries to consume from one to given number of digits (greedily). It also trims the preceding whitespaces if any. It cannot parse the negative number, so some date and time cannot be formatted then parsed with the same formatting items.
Variants
YearFull Gregorian year (FW=4, PW=∞). May accept years before 1 BCE or after 9999 CE, given an initial sign.
YearDiv100Gregorian year divided by 100 (century number; FW=PW=2). Implies the non-negative year.
YearMod100Gregorian year modulo 100 (FW=PW=2). Cannot be negative.
IsoYearYear in the ISO week date (FW=4, PW=∞). May accept years before 1 BCE or after 9999 CE, given an initial sign.
IsoYearDiv100Year in the ISO week date, divided by 100 (FW=PW=2). Implies the non-negative year.
IsoYearMod100Year in the ISO week date, modulo 100 (FW=PW=2). Cannot be negative.
MonthMonth (FW=PW=2).
DayDay of the month (FW=PW=2).
WeekFromSunWeek number, where the week 1 starts at the first Sunday of January (FW=PW=2).
WeekFromMonWeek number, where the week 1 starts at the first Monday of January (FW=PW=2).
IsoWeekWeek number in the ISO week date (FW=PW=2).
NumDaysFromSunDay of the week, where Sunday = 0 and Saturday = 6 (FW=PW=1).
WeekdayFromMonDay of the week, where Monday = 1 and Sunday = 7 (FW=PW=1).
OrdinalDay of the year (FW=PW=3).
HourHour number in the 24-hour clocks (FW=PW=2).
Hour12Hour number in the 12-hour clocks (FW=PW=2).
MinuteThe number of minutes since the last whole hour (FW=PW=2).
SecondThe number of seconds since the last whole minute (FW=PW=2).
NanosecondThe number of nanoseconds since the last whole second (FW=PW=9).
Note that this is not left-aligned;
see also Fixed::Nanosecond.
TimestampThe number of non-leap seconds since the midnight UTC on January 1, 1970 (FW=1, PW=∞). For formatting, it assumes UTC upon the absence of time zone offset.
Internal(InternalNumeric)Internal uses only.
This item exists so that one can add additional internal-only formatting without breaking major compatibility (as enum variants cannot be selectively private).
Trait Implementations
impl Clone for Numeric[src] 
impl Clone for Numericfn clone(&self) -> Numeric[src] 
fn clone(&self) -> NumericReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src] 
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Eq for Numeric[src] 
impl Eq for Numericimpl PartialEq<Numeric> for Numeric[src] 
impl PartialEq<Numeric> for Numericfn eq(&self, other: &Numeric) -> bool[src] 
fn eq(&self, other: &Numeric) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Numeric) -> bool[src] 
fn ne(&self, other: &Numeric) -> boolThis method tests for !=.
impl Debug for Numeric[src] 
impl Debug for NumericAuto Trait Implementations
Blanket Implementations
impl<T> From for T[src] 
impl<T> From for Timpl<T, U> Into for T where
    U: From<T>, [src] 
impl<T, U> Into for T where
    U: From<T>, impl<T> ToOwned for T where
    T: Clone, [src] 
impl<T> ToOwned for T where
    T: Clone, type Owned = T
fn to_owned(&self) -> T[src] 
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src] 
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API.  (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
    T: From<U>, [src] 
impl<T, U> TryFrom for T where
    T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src] 
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
    T: ?Sized, [src] 
impl<T> Borrow for T where
    T: ?Sized, impl<T> Any for T where
    T: 'static + ?Sized, [src] 
impl<T> Any for T where
    T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src] 
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API.  (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> BorrowMut for T where
    T: ?Sized, [src] 
impl<T> BorrowMut for T where
    T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src] 
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
    U: TryFrom<T>, [src] 
impl<T, U> TryInto for T where
    U: TryFrom<T>,