dateDifference method

int dateDifference(
  1. DateTime secondDate
)

Implementation

int dateDifference(DateTime secondDate) {
  return DateTime.utc(year, month, day)
      .difference(
          DateTime.utc(secondDate.year, secondDate.month, secondDate.day))
      .inDays;
}