Struct date::Date
[−]
[src]
pub struct Date { pub year: u32, pub month: u8, pub day: u8, }
A representation of a day in the Gregorian calendar.
Fields
year: u32
The year.
month: u8
The month.
day: u8
The day.
Methods
impl Date
[src]
fn new(year: u32, month: u8, day: u8) -> Date
Create a date by the specified year, month, and day.
fn at_utc(seconds: i64) -> Date
Return the UTC date specified in seconds counting from the Unix epoch.
fn at_utc_1904(seconds: i64) -> Date
Return the UTC date specified in seconds counting from January 1, 1904.
Trait Implementations
impl Clone for Date
[src]
fn clone(&self) -> Date
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 Copy for Date
[src]
impl Default for Date
[src]
impl PartialEq for Date
[src]
fn eq(&self, __arg_0: &Date) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Date) -> bool
This method tests for !=
.
impl Eq for Date
[src]
impl Ord for Date
[src]
fn cmp(&self, __arg_0: &Date) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl Debug for Date
[src]
impl Display for Date
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialOrd for Date
[src]
fn partial_cmp(&self, other: &Date) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more