pub struct DateTime {
pub year: u16,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub ms: u16,
}Expand description
DateTime representation from year to ms. Valid values are:
- year: [1970, 4000]
- month: [1, 12]
- day: [1, 31] (depending on month, leap year)
- hour: [0: 23]
- minute: [0, 59]
- second: [0, 59]
- ms: [0, 999]
Note: other values will be accepted, but will be classified invalid by the calendar, and if used, appropriate values will be added on top, eg. 32/01 -> 01/02.
Fields§
§year: u16§month: u8§day: u8§hour: u8§minute: u8§second: u8§ms: u16Implementations§
Trait Implementations§
Source§impl Ord for DateTime
impl Ord for DateTime
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for DateTime
impl PartialOrd for DateTime
impl Eq for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl Freeze for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnsafeUnpin for DateTime
impl UnwindSafe for DateTime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more