pub struct Date {
pub year: u16,
pub month: u8,
pub day: u8,
}Expand description
A date, data type G.
Fields§
§year: u16Year (EN 13757-3 Table A.5: a two-digit year up to 80 is 20xx, above is 19xx).
month: u8Month, 1–12 when valid.
day: u8Day, 1–31 when valid.
Implementations§
Source§impl Date
impl Date
Sourcepub fn add_months(self, months: i32) -> Option<Self>
pub fn add_months(self, months: i32) -> Option<Self>
The date months later (or earlier, when negative), for monthly profiles and
billing dates. The last day of a month stays the last day: 2008-01-31 + 1 month is
2008-02-29, + 2 months 2008-03-31 (OMS Vol. 2 Table G.5). Other days are clamped to
the month’s length. None for an invalid date or a year outside 0–65535.
Trait Implementations§
impl Copy for Date
impl Eq for Date
Source§impl Ord for Date
impl Ord for Date
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Date
impl PartialOrd for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Forget for Date
impl Freeze for Date
impl Move 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