Boundary of the most recent complete period as of a cutoff
Source:R/period_completeness.R
last_complete_period.Rdlast_complete_period_end() returns the (canonical calendar) end date of the
most recent period that is complete as of as_of; last_complete_period_start()
returns that period's start date. Completeness is judged with
period_is_complete(), so calendar selects the policy exactly as it does
there.
Arguments
- as_of
Reference cutoff date(s) (Date or coercible). Required—there is no default. Use the latest date in your data for completeness relative to how current the data is, or
Sys.Date()for the current date.- unit
Period size, one of
"week","month","quarter", or"year".- calendar
(character) A QuantLib calendar id (see qlcal::calendars). Defaults to
"WeekendsOnly".- week_start
Integer 1-7 giving the first day of the week (only used when
unit = "week"). Defaults togetOption("lubridate.week.start", 7).