Time constructor

Time(
  1. int hour,
  2. int minute
)

Creates a new Time object.

hour must be between 0 and 23.

minute must be between 0 and 59.

Implementation

Time(int hour, int minute)
    : assert(hour >= 0 && hour <= 23,
          "Hour must be between 0 and 23 (inclusive)."),
      assert(minute >= 0 && minute <= 59,
          "Minute must be between 0 and 59 (inclusive)."),
      _dateTime = DateTime(0, 0, 0, hour, minute);