isSameDateOrBefore method
Returns true if this date (date-only) is the same as or before other.
Compares only year/month/day — time components are ignored. Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
bool isSameDateOrBefore(DateTime other) {
final DateTime selfDate = toDateOnly();
final DateTime otherDate = other.toDateOnly();
return !selfDate.isAfter(otherDate);
}