subtract static method

DateTime subtract({
  1. required DateTime date,
  2. required AgeDuration duration,
})

subtract methos

Implementation

static DateTime subtract(
    {required DateTime date, required AgeDuration duration}) {
  duration.days *= -1;
  duration.months *= -1;
  duration.years *= -1;

  return add(date: date, duration: duration);
}