bizdiff: Compute the amount of business days between dates

View source: R/bizdiff.R

bizdiffR Documentation

Compute the amount of business days between dates

Description

Returns the number of business days between dates in a given vector of dates.

Usage

bizdiff(dates, cal)

Arguments

dates

a vector containing the dates to be differenced

cal

the calendar's name

Value

A 'numeric' vector of length 'n-1' (where 'n' is the input vector length), containing the business days computed between pairs of dates.

Date types accepted

The arguments from and to accept 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.

Examples

dates <- c("2017-05-10", "2017-05-12", "2017-05-17")
bizdiff(dates, "Brazil/ANBIMA")

bizdays documentation built on Jan. 22, 2023, 1:08 a.m.