difInDays method

int difInDays(
  1. DateTime? other
)

Implementation

int difInDays(DateTime? other) {
  if (other == null) {
    return 0;
  }
  if (isSameDate(other)) {
    return 0;
  }
  final newThis = DateTime(year, month, day, 0);
  final newOther = DateTime(other.year, other.month, other.day, 0);
  return newOther.difference(newThis).inDays;
}