Struct edtf::DateComplete [−][src]
pub struct DateComplete { /* fields omitted */ }Expand description
A structure to hold the date portion of a DateTime. It contains a valid date in the proleptic Gregorian calendar.
Implementations
This is supported on crate feature chrono only.
chrono only.Converts self to a chrono::NaiveDate
Create a complete date. Panics if the date is invalid.
Create a complete date. Returns None if the date is invalid. The only way a date can be invalid is if it isn’t a real date. There are otherwise no limitations on the range of acceptable years.
Trait Implementations
Convenience chrono::Datelike implementation, which mostly relies on internal conversion to chrono::NaiveDate.
Returns the year number in the calendar date.
Makes a new value with the year number changed. Read more
Makes a new value with the month number (starting from 1) changed. Read more
Makes a new value with the month number (starting from 0) changed. Read more
Makes a new value with the day of month (starting from 1) changed. Read more
Makes a new value with the day of month (starting from 0) changed. Read more
Makes a new value with the day of year (starting from 1) changed. Read more
Makes a new value with the day of year (starting from 0) changed. Read more
Returns the absolute year number starting from 1 with a boolean flag, which is false when the year predates the epoch (BCE/BC) and true otherwise (CE/AD). Read more
Counts the days in the proleptic Gregorian calendar, with January 1, Year 1 (CE) as day 1. Read more
Converts from chrono::NaiveDate.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for DateComplete
impl Send for DateComplete
impl Sync for DateComplete
impl Unpin for DateComplete
impl UnwindSafe for DateComplete
Blanket Implementations
Mutably borrows from an owned value. Read more