calculateDateDiff static method

int calculateDateDiff(
  1. DateTime startDate,
  2. DateTime endDate
)

Implementation

static int calculateDateDiff(DateTime startDate, DateTime endDate) {
  Duration diff = endDate.difference(startDate);
  return diff.inDays;
}