[][src]Struct gregor::NaiveDateTime

pub struct NaiveDateTime {
    pub year: i32,
    pub month: Month,
    pub day: u8,
    pub hour: u8,
    pub minute: u8,
    pub second: u8,
}

A date and time without associated time zone information.

Fields

year: i32

Year number per ISO 8601.

For example, 2016 AC is +2016, 1 AC is +1, 1 BC is 0, 2 BC is -1, etc.

month: Monthday: u8

1st of the month is day 1

hour: u8minute: u8second: u8

Methods

impl NaiveDateTime[src]

pub fn new(
    year: i32,
    month: Month,
    day: u8,
    hour: u8,
    minute: u8,
    second: u8
) -> Self
[src]

pub fn day_of_the_week(&self) -> DayOfTheWeek[src]

Trait Implementations

impl Copy for NaiveDateTime[src]

impl Debug for NaiveDateTime[src]

impl PartialEq<NaiveDateTime> for NaiveDateTime[src]

impl Eq for NaiveDateTime[src]

impl Ord for NaiveDateTime[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more

impl PartialOrd<NaiveDateTime> for NaiveDateTime[src]

impl Clone for NaiveDateTime[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]