addYears method
Makes a new date object with
added years
to this date
Original date object remains unchanged
This method is safe
Implementation
@override
Gregorian addYears(int years) {
if (years == 0) {
return this;
} else {
return Gregorian(
year + years,
month,
day,
hour,
minute,
second,
millisecond,
);
}
}