pub_date: HSMR publication date

View source: R/pub_date.R

pub_dateR Documentation

HSMR publication date

Description

pub_date takes the final date for which SMR data are included in the current publication. It uses this cut-off date to calculate the publication dates of the previous, current and next HSMR publications.

Usage

pub_date(end_date, pub = c("previous", "current", "next"))

Arguments

end_date

The cut-off date for data to be included in the current HSMR publication, supplied with Date class. Must be the final day of either March, June, September or December.

pub

A character string specifying the publication of interest. Valid options are 'previous', 'current' and 'next'.

Details

The publication date for HSMR is always the second Tuesday of the month.

Examples

extract_end_date <- lubridate::dmy(30092018)

pub_date(end_date = extract_end_date, pub = "previous")
format(pub_date(end_date = extract_end_date, pub = "current"), "%d %B %Y")
format(pub_date(end_date = extract_end_date, pub = "next"), "%d/%m/%Y")


Public-Health-Scotland/hsmr documentation built on June 24, 2024, 1:48 a.m.