addYears method

DateTime addYears(
  1. int years
)

addYears(): Adds a specified number of years to a DateTime.

Implementation

DateTime addYears(int years) {
  return DateTime(year + years, month, day, hour, minute, second, millisecond,
      microsecond);
}