Each of bop
and eop
contains a list of functions, whose names all
consist of two letters, the first of which stands for last, this, next
while the second stands for year, quarter, month, week.
For example, eop$ty()
means "the ending of period of this year"
and bop$lm()
means "the beginning of period of last month".
Details
All functions' signatures are the same, with only one argument
x
, which could be a Date
or values that can be converted to Date
via ymd()
.
Examples
bop$ty(as.Date("2021-03-02"))
#> [1] "2021-01-01"
## supports 'YMD' formatted integer or string
bop$ty(210302)
#> [1] "2021-01-01"
eop$tm(200201)
#> [1] "2020-02-29"