#[repr(u8)]
pub enum Day {
DayOfMonth,
DayOfYear,
DayOfWeekInMonth,
ModifiedJulianDay,
}
Expand description
An enum for the possible symbols of a day field in a date pattern.
Variants
DayOfMonth
Field symbol for day of month (numeric).
This field symbol is represented by the character d
in a date formatting pattern string.
For more details, see documentation on date field symbols.
DayOfYear
Field symbol for day of year (numeric).
This field symbol is represented by the character D
in a date formatting pattern string.
For more details, see documentation on date field symbols.
DayOfWeekInMonth
Field symbol for the day of week occurrence relative to the month (numeric).
For the example "2nd Wed in July"
, this field would provide "2"
. Should likely be paired with the Weekday
field.
This field symbol is represented by the character F
in a date formatting pattern string.
For more details, see documentation on date field symbols.
ModifiedJulianDay
Field symbol for the modified Julian day (numeric).
The value of this field differs from the conventional Julian day number in a couple of ways, which are based on measuring relative to the local time zone.
This field symbol is represented by the character g
in a date formatting pattern string.
For more details, see documentation on date field symbols.
Trait Implementations
sourceimpl Bake for Day
impl Bake for Day
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl<'de> Deserialize<'de> for Day
impl<'de> Deserialize<'de> for Day
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Day, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Day, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Day> for FieldSymbol
impl From<Day> for FieldSymbol
sourcefn from(input: Day) -> FieldSymbol
fn from(input: Day) -> FieldSymbol
Converts to this type from the input type.
sourceimpl Ord for Day
impl Ord for Day
sourceimpl PartialOrd<Day> for Day
impl PartialOrd<Day> for Day
sourcefn partial_cmp(&self, other: &Day) -> Option<Ordering>
fn partial_cmp(&self, other: &Day) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for Day
impl Serialize for Day
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'a> Yokeable<'a> for Day
impl<'a> Yokeable<'a> for Day
sourcefn transform(&self) -> &<Day as Yokeable<'a>>::Output
fn transform(&self) -> &<Day as Yokeable<'a>>::Output
This method must cast self
between &'a Self<'static>
and &'a Self<'a>
. Read more
sourcefn transform_owned(self) -> <Day as Yokeable<'a>>::Output
fn transform_owned(self) -> <Day as Yokeable<'a>>::Output
This method must cast self
between Self<'static>
and Self<'a>
. Read more
sourceimpl<'a> ZeroMapKV<'a> for Day
impl<'a> ZeroMapKV<'a> for Day
impl Copy for Day
impl Eq for Day
impl<'a> IsCovariant<'a> for Day
impl StructuralEq for Day
impl StructuralPartialEq for Day
Auto Trait Implementations
impl RefUnwindSafe for Day
impl Send for Day
impl Sync for Day
impl Unpin for Day
impl UnwindSafe for Day
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more