differenceInHours method

int differenceInHours(
  1. DateTime other
)

Returns difference between two dates in hours

Implementation

int differenceInHours(DateTime other) {
  return DateTime(year, month, day)
      .difference(DateTime(other.year, other.month, other.day))
      .inHours;
}