calendar_eow: End of Week Date
Description
Returns the last day of the week from a Date given a choice of week days.
Usage
calendar_eow(date, day = 7, ...)
Arguments
- date
a Date vector
- day
a value between 1 (Monday) and 7 (Sunday).
- ...
not used
Details
Given a Date (such as 2019-01-02) and a day of 7, will return the Date for
the Sunday at or immediately after that. The week starting day is Monday
(1). A simple use case is when one wants to aggregate daily data to a
regular weekly sequence.