daysSince method

int daysSince(
  1. DateTime other
)

Returns the number of days since other.

Example:

DateTime(2024, 1, 20).daysSince(DateTime(2024, 1, 15)); // 5

Implementation

int daysSince(DateTime other) {
  return difference(other).inDays;
}