beop {ymd} | R Documentation |
Find the Beginning or End of Period
Description
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"))
## supports 'YMD' formatted integer or string
bop$ty(210302)
eop$tm(200201)
[Package ymd version 0.1.0 Index]