toDateOnly method
Removes the time component from the DateTime object, returning only the date part (year, month, and day). Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
// ignore: saropa_lints/avoid_datetime_constructor -- year/month/day come from this valid DateTime (implicit this), so nothing can roll over
DateTime toDateOnly() => DateTime(year, month, day);