week.ends: Check to see if a week contains the end of a month or quarter

week.endsR Documentation

Check to see if a week contains the end of a month or quarter

Description

Returns a logical vector indicating whether the given week contains the end of a month or quarter.

Usage

  WeekEndsMonth(week.ending)
  WeekEndsQuarter(week.ending)

Arguments

week.ending

A vector of class Date. Each entry contains the date of the last day in a week.

Value

A logical vector indicating whether the given week contains the end of a month or a quarter.

Author(s)

Steven L. Scott steve.the.bayesian@gmail.com

See Also

bsts.mixed.

Examples

  week.ending <- as.Date(c("2011-10-01",
                           "2011-10-08",
                           "2011-12-03",
                           "2011-12-31"))
  WeekEndsMonth(week.ending) == c(TRUE, FALSE, TRUE, TRUE)
  WeekEndsQuarter(week.ending) == c(TRUE, FALSE, FALSE, TRUE)

bsts documentation built on May 29, 2024, 2:14 a.m.