diffYearsFromCurrent property

num diffYearsFromCurrent

Gets the number of years between the supplied DateTime and the current time

Implementation

num get diffYearsFromCurrent {
  return Jiffy.parseFromDateTime(DateTime.now()).diff(Jiffy.parseFromDateTime(this), unit: Unit.year);
}