pub fn add_years(&mut self, years: u16) {
        let mut new_years = self.y + years;
        if new_years > 9999 {
            new_years = 9999;
        }
        if self.m == 2 && self.d == 29 && !date_utils::is_leap_year(new_years) {
            self.d = 28
        }
        self.y = new_years;
    }
/// Adds a number of years to a DateTuple.
///
/// If the date is set to Feb 29 and the resulting year is not a leap year,
/// it will be changed to Feb 28.
Adds a number of years to a DateTuple.
If the date is set to Feb 29 and the resulting year is not a leap year,
it will be changed to Feb 28.
Adds a number of years to a DateTuple . If the date is set to Feb 29 and the resulting year is not a leap year it will be changed to Feb 28 .
pub fn add_years(&mut self, years: u16) {
        let mut new_years = self.y + years;
        if new_years > 9999 {
            new_years = 9999;
        }
        if self.m == 2 && self.d == 29 && !date_utils::is_leap_year(new_years) {
            self.d = 28
        }
        self.y = new_years;
    }
pub fn add_years ( & mut self , years : u16 ) { let mut new_years = self . y + years ; if new_years > 9999 { new_years = 9999 ; } if self . m == 2 && self . d == 29 && ! date_utils :: is_leap_year ( new_years ) { self . d = 28 } self . y = new_years ; }
Adds a number of years to a DateTuple.
Adds a number of years to a DateTuple .
&mut self
years
u16
&mut self
years
u16