Learn R Programming

bizdays (version 0.1.5)

bizyears: Computes the period between two dates in years taking into account business days

Description

Computes the period between two dates in years taking into account business days

Usage

bizyears(from, to, cal)

## S3 method for class 'character': bizyears(from, to, cal = bizdays.options$get("default.calendar"))

## S3 method for class 'POSIXct': bizyears(from, to, cal = bizdays.options$get("default.calendar"))

## S3 method for class 'POSIXlt': bizyears(from, to, cal = bizdays.options$get("default.calendar"))

## S3 method for class 'Date': bizyears(from, to, cal = bizdays.options$get("default.calendar"))

Arguments

from
the initial date (or a vector of dates)
to
the final date (or a vector of dates).
cal
an instance of Calendar

Examples

Run this code
data(holidaysANBIMA)
cal <- Calendar(holidaysANBIMA, dib=252)
bizyears("2013-01-02", "2013-01-31", cal)

Run the code above in your browser using DataLab