diffInWeeks method

num diffInWeeks(
  1. DateTime other, {
  2. bool asFloat = false,
})

Returns the difference between two DateTime objects in weeks.

Implementation

num diffInWeeks(DateTime other, {bool asFloat = false}) {
  return diff(other, unit: TimeUnit.week, asFloat: asFloat);
}