ceil method

  1. @Possible({RangeError})
  2. @useResult
LocalTime ceil(
  1. TimeUnit unit,
  2. int value
)

Returns a copy of this ceiled to the nearest unit and value.

Contract

Throws a RangeError if value <= 0.

Example

LocalTime(12, 31, 59).round(TimeUnit.minutes, 5); // 12:35

LocalTime(12, 34, 59).round(TimeUnit.minutes, 5); // 12:35

Implementation

@Possible({RangeError})
@useResult LocalTime ceil(TimeUnit unit, int value) => LocalTime._(_native.ceil(unit, value));