isAtSameMicrosecondAs method
Returns if two dates are in same microsecond, millisecond, second, minute, hour, day, month, year.
Assumes both this
and other
has same timezone
To convert both to UTC
before comparison, set enforceUTC
to true
Implementation
bool isAtSameMicrosecondAs(
DateTime other, {
bool enforceUTC = false,
}) =>
_isAtSameUnitAs(
other,
DurationUnit.microsecond,
enforceUTC: enforceUTC,
);