fn date_plus_plus(mut date: Date) -> Date {
    let month_days= [31, 28, 31, 30 ,31, 30, 31, 31, 30, 31, 30, 31];
    if date.minute == 59 {
        *date.minute_mut() = 0;
        if date.hour == 23 {
            *date.hour_mut() = 0;
            if date.day == month_days[(date.month - 1) as usize] {
                *date.day_mut() = 1;
                if date.month == 12 {
                    *date.month_mut() = 1;
                    *date.year_mut() = date.year + 1;
                } else {
                    *date.month_mut() = date.month + 1;
                };
            } else {
                *date.day_mut() = date.day + 1;
            };
        } else {
            *date.hour_mut() = date.hour + 1;
        };
    } else {
        *date.minute_mut() = date.minute + 1;
    };
    date
}
// add one minute to a Date struct
add one minute to a Date struct
add one minute to a Date struct
fn date_plus_plus(mut date: Date) -> Date {
    let month_days= [31, 28, 31, 30 ,31, 30, 31, 31, 30, 31, 30, 31];
    if date.minute == 59 {
        *date.minute_mut() = 0;
        if date.hour == 23 {
            *date.hour_mut() = 0;
            if date.day == month_days[(date.month - 1) as usize] {
                *date.day_mut() = 1;
                if date.month == 12 {
                    *date.month_mut() = 1;
                    *date.year_mut() = date.year + 1;
                } else {
                    *date.month_mut() = date.month + 1;
                };
            } else {
                *date.day_mut() = date.day + 1;
            };
        } else {
            *date.hour_mut() = date.hour + 1;
        };
    } else {
        *date.minute_mut() = date.minute + 1;
    };
    date
}
fn date_plus_plus ( mut date : Date ) -> Date { let month_days = [ 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 ] ; if date . minute == 59 { * date . minute_mut ( ) = 0 ; if date . hour == 23 { * date . hour_mut ( ) = 0 ; if date . day == month_days [ ( date . month - 1 ) as usize ] { * date . day_mut ( ) = 1 ; if date . month == 12 { * date . month_mut ( ) = 1 ; * date . year_mut ( ) = date . year + 1 ; } else { * date . month_mut ( ) = date . month + 1 ; } ; } else { * date . day_mut ( ) = date . day + 1 ; } ; } else { * date . hour_mut ( ) = date . hour + 1 ; } ; } else { * date . minute_mut ( ) = date . minute + 1 ; } ; date }
add one minute to a Date struct
add one minute to a Date struct
date
Date