add static method
add method
Implementation
static DateTime add({required DateTime date, required AgeDuration duration}) {
int years = date.year + duration.years;
years += (date.month + duration.months) ~/ DateTime.monthsPerYear;
int months = ((date.month + duration.months) % DateTime.monthsPerYear);
int days = date.day + duration.days - 1;
return DateTime(years, months, 1).add(Duration(days: days));
}