Time.fromMinutes constructor

Time.fromMinutes(
  1. int minutes
)
Initializes a new instance of Time. The number of minutes since 12:00AM.

Implementation

Time.fromMinutes(int minutes) {
  if (minutes < 0 || minutes >= 1440) {
    throw new ArgumentException("Strings.MinutesMustBeBetween0And1439");
  }

  this.Hours = minutes ~/ 60;
  this.Minutes = minutes % 60;
  this.Seconds = 0;
}