Struct beancount_parser::Date
source · [−]pub struct Date { /* private fields */ }Expand description
A date
The parser has some sanity check to make sure the date remotly makes sense but it doesn’t verify it is an actual real date valid date.
If that is important, you should use a date-time library to verify the validity.
Implementations
sourceimpl Date
impl Date
sourcepub fn month_of_year(&self) -> u8
pub fn month_of_year(&self) -> u8
Returns the number of the month in the year
The result is between 1 (january) and 12 (december) inclusive.
sourcepub fn day_of_month(&self) -> u8
pub fn day_of_month(&self) -> u8
Returns the number of the day in the month
The result is between 1 and 31 inclusive
Trait Implementations
impl Copy for Date
impl Eq for Date
impl StructuralEq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more