# [−][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 whitespace if any.
It cannot parse the negative number, so some date and time cannot be formatted then
parsed with the same formatting items.

## Variants

Full Gregorian year (FW=4, PW=∞). May accept years before 1 BCE or after 9999 CE, given an initial sign.

Gregorian year divided by 100 (century number; FW=PW=2). Implies the non-negative year.

Gregorian year modulo 100 (FW=PW=2). Cannot be negative.

Year in the ISO week date (FW=4, PW=∞). May accept years before 1 BCE or after 9999 CE, given an initial sign.

Year in the ISO week date, divided by 100 (FW=PW=2). Implies the non-negative year.

Year in the ISO week date, modulo 100 (FW=PW=2). Cannot be negative.

Month (FW=PW=2).

Day of the month (FW=PW=2).

Week number, where the week 1 starts at the first Sunday of January (FW=PW=2).

Week number, where the week 1 starts at the first Monday of January (FW=PW=2).

Week number in the ISO week date (FW=PW=2).

Day of the week, where Sunday = 0 and Saturday = 6 (FW=PW=1).

Day of the week, where Monday = 1 and Sunday = 7 (FW=PW=1).

Day of the year (FW=PW=3).

Hour number in the 24-hour clocks (FW=PW=2).

Hour number in the 12-hour clocks (FW=PW=2).

The number of minutes since the last whole hour (FW=PW=2).

The number of seconds since the last whole minute (FW=PW=2).

The number of nanoseconds since the last whole second (FW=PW=9).
Note that this is *not* left-aligned;
see also `Fixed::Nanosecond`

.

The 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]

`fn clone(&self) -> Numeric`

[src]

`fn clone_from(&mut self, source: &Self)`

1.0.0[src]

`impl Debug for Numeric`

[src]

`impl Eq for Numeric`

[src]

`impl PartialEq<Numeric> for Numeric`

[src]

`impl StructuralEq for Numeric`

[src]

`impl StructuralPartialEq for Numeric`

[src]

## Auto Trait Implementations

`impl RefUnwindSafe for Numeric`

`impl Send for Numeric`

`impl Sync for Numeric`

`impl Unpin for Numeric`

`impl UnwindSafe for Numeric`

## 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,

`pub fn borrow_mut(&mut self) -> &mut T`

[src]

`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.

`pub fn to_owned(&self) -> T`

[src]

`pub 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.

`pub 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>,