Description Usage Arguments Details Value References See Also Examples

This calculates the years between two dates using the given day basis convention.

1 |

`maturity_date` |
a vector of dates representing the maturity date of the instrument. Only used for 30E/360 ISDA day basis. |

`date1` |
A vector of dates. This will be coerced to a |

`date2` |
A vector of dates. This will be coerced to a |

`day_basis` |
The basis on which the year fraction is calculated. See [is_valid_day_basis()] |

The order of `date1`

and `date2`

is not important. If `date1`

is less than `date2`

then the result will be non-negative. Otherwise,
the result will be negative. The parameters will be repeated with recycling
such that each parameter's length is equal to maximum length of
any of the parameters.

a numeric vector representing the number of years between
`date1`

and `date2`

.

http://en.wikipedia.org/wiki/Day_count_convention

Other counter methods: `actual_360`

,
`actual_365`

,
`actual_actual_isda`

,
`is_valid_day_basis`

,
`thirty_360_eu_isda`

,
`thirty_360_eu_plus`

,
`thirty_360_eu`

, `thirty_360_us`

,
`thirty_360`

1 2 3 4 5 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.