date_bop {xefun}R Documentation

start/end date by period

Description

The date of bop (beginning of period) or eop (end of period).

Usage

date_bop(freq, x, workday = FALSE)

date_eop(freq, x, workday = FALSE)

Arguments

freq

the frequency of period. It supports weekly, monthly, quarterly and yearly.

x

a date

workday

logical, whether to return the latest workday

Value

date_bop returns the beginning date of period of corresponding x by frequency.

date_eop returns the end date of period of corresponding x by frequency.

Examples

date_bop('weekly', Sys.Date())
date_eop('weekly', Sys.Date())

date_bop('monthly', Sys.Date())
date_eop('monthly', Sys.Date())


[Package xefun version 0.1.5 Index]