Period constructor

const Period({
  1. int years = 0,
  2. int months = 0,
  3. int days = 0,
  4. int hours = 0,
  5. int minutes = 0,
  6. int seconds = 0,
  7. int milliseconds = 0,
  8. int microseconds = 0,
})

Creates a Period.

The individual units of time may be negative. No normalization is performed.

Period(years: 1, minutes: -2); // 1 year, -2 minutes

Implementation

const Period({
  this.years = 0,
  this.months = 0,
  this.days = 0,
  this.hours = 0,
  this.minutes = 0,
  this.seconds = 0,
  this.milliseconds = 0,
  this.microseconds = 0,
});