toyears, tomonths and todays functions convert Term objects according to Daycount.

toyears(x, t)

tomonths(x, t)

todays(x, t)

Arguments

x

a Daycount object.

t

a Term object.

Value

A Term object converted to the units accordingly the used function.

Details

toyears returns the given Term in years units. tomonths returns the given Term in months units. todays returns the given Term in days units.

Examples

dc <- daycount("actual/360")
t <- term(10, "months")
toyears(dc, t)
#> [1] "0.833333333333333 year"
tomonths(dc, t)
#> [1] "10 months"
todays(dc, t)
#> [1] "300 days"