pub fn subtract_years(&mut self, years: u16) {
        let mut new_years = i32::from(self.y) - i32::from(years);
        if new_years < 0 {
            new_years = 0;
        }
        let new_years = new_years as u16;
        if self.m == 2 && self.d == 29 && !date_utils::is_leap_year(new_years) {
            self.d = 28
        }
        self.y = new_years;
    }
/// Subtracts a number of years from 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.
Subtracts a number of years from 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.
Subtracts a number of years from 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 subtract_years(&mut self, years: u16) {
        let mut new_years = i32::from(self.y) - i32::from(years);
        if new_years < 0 {
            new_years = 0;
        }
        let new_years = new_years as u16;
        if self.m == 2 && self.d == 29 && !date_utils::is_leap_year(new_years) {
            self.d = 28
        }
        self.y = new_years;
    }
pub fn subtract_years ( & mut self , years : u16 ) { let mut new_years = i32 :: from ( self . y ) - i32 :: from ( years ) ; if new_years < 0 { new_years = 0 ; } let new_years = new_years as u16 ; if self . m == 2 && self . d == 29 && ! date_utils :: is_leap_year ( new_years ) { self . d = 28 } self . y = new_years ; }
Subtracts a number of years from a DateTuple.
Subtracts a number of years from a DateTuple .
&mut self
years
u16
&mut self
years
u16