Time.fromYears constructor

Time.fromYears(
  1. Rational years
)

Creates a Time representing the specified number of years.

Implementation

factory Time.fromYears(Rational years) =>
    Time.fromUnits(TimeUnit.year, years);