truncate method

  1. @useResult
LocalTime truncate({
  1. required TimeUnit to,
})

Returns a copy of this truncated to the TimeUnit.

LocalTime(12, 39, 59).truncate(to: TimeUnit.minutes); // 12:39

Implementation

@useResult LocalTime truncate({required TimeUnit to}) => LocalTime._(_native.truncate(to: to));