Struct gregor::DateTime
[−]
[src]
pub struct DateTime<Tz> { pub time_zone: Tz, pub year: i32, pub month: Month, pub day: u8, pub hour: u8, pub minute: u8, pub second: u8, }
Fields
time_zone: Tz
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: Month
day: u8
1st of the month is day 1
hour: u8
minute: u8
second: u8
Methods
impl<Tz> DateTime<Tz>
[src]
Trait Implementations
impl<Tz: Clone> Clone for DateTime<Tz>
[src]
fn clone(&self) -> DateTime<Tz>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<Tz: Copy> Copy for DateTime<Tz>
[src]
impl<Tz: PartialEq> PartialEq for DateTime<Tz>
[src]
fn eq(&self, __arg_0: &DateTime<Tz>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DateTime<Tz>) -> bool
This method tests for !=
.
impl<Tz: Eq> Eq for DateTime<Tz>
[src]
impl<Tz: Debug> Debug for DateTime<Tz>
[src]
impl From<UnixTimestamp> for DateTime<Utc>
[src]
fn from(u: UnixTimestamp) -> Self
Performs the conversion.