Calculates the start and end dates of the year-to-date period
based on the maximum date in the provided dates. Both partial-
and full-month methods are supported, see rollback_partial_month
.
Arguments
- dates
a vector of dates, or something coercible with
lubridate::as_date()
- rollback_partial_month
If TRUE, and the maximum date in
dates
is not an end-of-month date, the end date will be rolled back to the last day of the previous month. If FALSE the end date will be the maximum date indates
.