is.ph: Create or test for dates of public holidays

Description Usage Arguments Value Examples

Description

Create or test for dates of public holidays, with option for off-in-lieu.

Usage

1
is.ph(date, oil = T)

Arguments

date

A date vector to be tested.

oil

Logical. Default TRUE will include off-in-lieu.

Value

A logical vector indicating public holiday or off-in-lieu.

Examples

1
2
3
4
library(dplyr)
library(lubridate)
data.frame(cal = seq.Date(ymd(20130101), ymd(20130401), 1) ) %>% 
mutate(is_ph = is.ph(cal, TRUE))

tselert/sgholidays documentation built on Dec. 23, 2021, 12:57 p.m.