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 remotely 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§
source§impl 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§
source§impl Ord for Date
impl Ord for Date
source§impl PartialEq<Date> for Date
impl PartialEq<Date> for Date
source§impl PartialOrd<Date> for Date
impl PartialOrd<Date> for Date
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more