addHours method

LocalTime addHours(
  1. int hours
)

Returns a new LocalTime representing the current value with the given number of hours added.

If the value goes past the start or end of the day, it wraps - so 11pm plus two hours is 1am, for example.

  • hours: The number of hours to add

Returns: The current value plus the given number of hours.

Implementation

LocalTime addHours(int hours) => TimePeriodField.hours.addTime(this, hours);