pub struct Date { /* private fields */ }Expand description
All valid dates on the Wii. Year is a range between 0 and 35, symbolizing 2000 and 2035 respectively. Leap years are accounted for when validating February day counts.
Implementations§
Source§impl Date
impl Date
Sourcepub fn new(year: u16, month: u8, day: u8) -> Result<Self, DateError>
pub fn new(year: u16, month: u8, day: u8) -> Result<Self, DateError>
Creates a new Date from a full year, month, and day.
§Arguments
year- The full calendar year (2000–2035).month- The month (1–12).day- The day of the month, validated against the given month and year.
§Errors
Returns DateError::YearInvalid if year is outside the range 2000–2035.
Returns DateError::MonthInvalid if month is outside the range 1–12.
Returns DateError::DayInvalid if day exceeds the maximum for the given
month, accounting for leap years in February.
Trait Implementations§
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