date_end_period: Get the string of the first date in a period

View source: R/date_end_period.R

date_end_periodR Documentation

Get the string of the first date in a period

Description

Takes a period used in mandatory surveillance data and returns first date in the period.

Usage

date_end_period(x, period_type)

Arguments

x

A period, either string or numeric

period_type

A string, one of "fq", "cq" or "fyear6"

Value

A string in format dd/mm/yyyy

See Also

date_start_period

Examples

date_end_period(20154, "fq")
date_end_period(20154, "cq")
date_end_period(201516, "fyear6")
dat <- data.frame(x = c(20151, 20152, 20153, 20154))
date_end_period(dat$x, "fq")
date_end_period(dat$x, "cq")

PublicHealthEngland/hcaidcs documentation built on Jan. 19, 2024, 8:38 a.m.