OxL Reference

method Period.totalMonths

Total months (years * 12 + months).

Example:

oxl✓ checked in CI
use std.time { Period }

fn main() io {
  print("{Period(years: 1, months: 3).totalMonths()}")
}
Output
15
pub(api) fn totalMonths() -> i64

Since. 1.0.0-beta

Returns

i64

Effects

none declared (pure unless the body says otherwise)

Defined in: std/time/time.oxl:961

See also