bizdayse {bizdays}R Documentation

Business days and current days equivalence

Description

bizdayse stands for business days equivalent, it returns the amount of business days equivalent to a given number of current days.

Usage

bizdayse(dates, curd, cal)

Arguments

dates

the reference dates

curd

the amount of current days

cal

the calendar's name

Details

Let us suppose I have a reference date dates and I offset that date by curd current days. bizdayse returns the business days between the reference date and the new date offset by curd current days.

This is equivalent to

refdate <- Sys.Date()
curd <- 10
newdate <- refdate + 10 # offset refdate by 10 days
# this is equals to bizdayse(refdate, 10)
bizdays(refdate, newdate)

Value

An integer representing an amount of business days.

Date types accepted

The argument dates accepts Date objects and any object that returns a valid Date object when passed through as.Date, which include all POSIX* classes and character objects with ISO formatted dates.

Recycle rule

These arguments handle the recycle rule so a vector of dates and a vector of numbers can be provided and once those vectors differs in length the recycle rule is applied.

Examples

bizdayse("2013-01-02", 3, "Brazil/ANBIMA")

[Package bizdays version 1.0.16 Index]