pub struct Date {
pub year: Year,
pub month: Option<DateField>,
pub day: Option<DateField>,
}Expand description
A (possibly qualified, possibly partially unspecified) EDTF date.
Fields§
§year: YearThe year component (always present).
month: Option<DateField>Month 01–12 or sub-year grouping code 21–41.
day: Option<DateField>Calendar day of month.
Implementations§
Source§impl Date
impl Date
Sourcepub fn precision(&self) -> Precision
pub fn precision(&self) -> Precision
The precision of this date (its lowest specified component).
Sourcepub fn is_uncertain(&self) -> bool
pub fn is_uncertain(&self) -> bool
True if any component is marked uncertain (? or %).
Sourcepub fn is_approximate(&self) -> bool
pub fn is_approximate(&self) -> bool
True if any component is marked approximate (~ or %).
Sourcepub fn has_unspecified(&self) -> bool
pub fn has_unspecified(&self) -> bool
True if any component contains an unspecified digit (X).
Trait Implementations§
impl Copy for Date
impl Eq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnsafeUnpin for Date
impl UnwindSafe for Date
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