citHeader("To cite the hmrc package in publications use:")

year <- if (!is.null(meta$Date) && nzchar(meta$Date)) {
  sub("-.*", "", meta$Date)
} else {
  format(Sys.Date(), "%Y")
}
vers <- meta$Version

bibentry(
  bibtype  = "Manual",
  title    = "hmrc: Download and Tidy HMRC Statistical Data",
  author   = person("Charles", "Coverdale",
                    email = "charlesfcoverdale@gmail.com",
                    role  = c("aut", "cre")),
  year     = year,
  note     = sprintf("R package version %s", vers),
  url      = "https://CRAN.R-project.org/package=hmrc",
  textVersion = paste0(
    "Coverdale, C. (", year, "). ",
    "hmrc: Download and Tidy HMRC Statistical Data. ",
    "R package version ", vers, ". ",
    "https://CRAN.R-project.org/package=hmrc"
  )
)
