method Period.ofYears
A calendar period of n years.
Example:
use std.time { Period }
fn main() io {
print("{Period.ofYears(2).totalMonths()}")
}Output
24
pub(api) static fn ofYears(n: i64) -> PeriodSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
n | i64 |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:891