truncate method
Returns a copy of this truncated to the TemporalUnit.
DateTime(2023, 4, 15).truncate(to: DateUnit.months); // 2023-04-01 00:00
Implementation
@useResult DateTime truncate({required TemporalUnit to}) => _adjust(to, (time) => time);