year <- sub("-.*", "", meta$Date)
if (is.null(year) || identical(year, "") || isTRUE(length(year) == 0))
  year <- format(Sys.Date(), "%Y")

citHeader("To cite the wdpar package in publications, please use:")

bibentry(
  bibtype = "Article",
  title = "wdpar: Interface to the World Database on Protected Areas",
  author = c(person(c("Jeffrey", "O"), "Hanson")),
  year = "2022",
  journal = "Journal of Open Source Software",
  volume = "7",
  pages = "4594",
  doi = "10.21105/joss.04594"
)

bibentry(
  bibtype = "Manual",
  title = "Protected Planet: The World Database on Protected Areas (WDPA)",
  author = c(person("UNEP-WCMC"), person("IUCN")),
  year = year,
  version = "[insert month/year of the version downloaded]",
  publisher = "UNEP-WCMC and IUCN",
  address = "Cambridge, UK",
  url = "https://www.protectedplanet.net/en",
  textVersion = paste0(
    "UNEP-WCMC and IUCN (", year, ") Protected Planet: The World Database on ",
    "Protected Areas (WDPA), [insert month/year of the version downloaded], ",
    "Cambridge, UK: UNEP-WCMC and IUCN. Available at: www.protectedplanet.net."
  )
)

bibentry(
  bibtype = "Manual",
  title = "Protected Planet: The world database on other effective area-based conservation measures",
  author = c(person("UNEP-WCMC"), person("IUCN")),
  year = year,
  version = "[insert month/year of the version downloaded]",
  publisher = "UNEP-WCMC and IUCN",
  address = "Cambridge, UK",
  url = "https://www.protectedplanet.net/en",
  textVersion = paste0(
    "UNEP-WCMC and IUCN (", year, ") Protected Planet: The world database on ",
    "other effective area-based conservation measures, ",
    "[insert month/year of the version downloaded], ",
    "Cambridge, UK: UNEP-WCMC and IUCN. Available at: www.protectedplanet.net."
  )
)

citFooter("Please cite this package and the relevant databases used in publications. For package version, use \"packageVersion('wdpar')\"\n\n")
