isAtSameDayAs method

bool isAtSameDayAs(
  1. DateTime other, {
  2. bool enforceUTC = false,
})

Returns if two dates are in same day, month, year.

Assumes both this and other has same timezone

To convert both to UTC before comparison, set enforceUTC to true

Implementation

bool isAtSameDayAs(
  DateTime other, {
  bool enforceUTC = false,
}) =>
    _isAtSameUnitAs(
      other,
      DurationUnit.day,
      enforceUTC: enforceUTC,
    );