Learn R Programming

qlcal (version 0.1.0)

getEndOfMonth: Compute end-of-month

Description

Compute a vector of dates with end-of-month

Usage

getEndOfMonth(dates, xp = NULL)

Value

A Date vector with dates which are end-of-month

Arguments

dates

A Date vector with dates

xp

An optional calendar object, if missing the default instance is used

Details

This function takes a vector of dates and returns another vector of dates of the same length returning at each position whether the corresponding end-of-month date in the currently active (global) calendar.

Examples

Run this code
getEndOfMonth(Sys.Date()+0:6)

Run the code above in your browser using DataLab