year    <- sub("-.*", "", meta$Date)
version <- meta$Version
note    <- sprintf("R package version %s", version)


citHeader("To cite airGR in publications use these two references:")

bibentry(bibtype     ="Article",
         title       = "The Suite of Lumped {GR} Hydrological Models in an {R} package",
         author      = personList(as.person("L. Coron"), as.person("G. Thirel"), as.person("O. Delaigue"), as.person("C. Perrin"), as.person("V. Andréassian")),
         journal     = "Environmental Modelling and Software",
         year        = "2017",
         pages       = {"166-171"},
         volume      = {94},
         doi         = "10.1016/j.envsoft.2017.05.002",
         textVersion =
           paste("Coron, L., Thirel, G., Delaigue, O., Perrin, C. and Andréassian, V.",
                 "(2017).",
                 "The Suite of Lumped GR Hydrological Models in an R package.",
                 "Environmental Modelling and Software,",
                 "94, 166-171,",
                 "doi: 10.1016/j.envsoft.2017.05.002.",
                 sep = " ")
)

bibentry(bibtype     = "Manual",
         title       = "{airGR}: Suite of {GR} Hydrological Models for Precipitation-Runoff Modelling",
         author      = personList(as.person("L. Coron"), as.person("O. Delaigue"), as.person("G. Thirel"), as.person("D. Dorchies"), as.person("C. Perrin"), as.person("C. Michel")),
         journal     = "R News",
         year        = year,
         note        = note,
         doi         = "10.15454/EX11NA",
         url         = "https://CRAN.R-project.org/package=airGR",
         textVersion =
           paste0("Coron, L., Delaigue, O., Thirel, G., Dorchies, D., Perrin, C. and Michel, C. (",
                  year,
                  "). airGR: Suite of GR Hydrological Models for Precipitation-Runoff Modelling. ",
                  note, ", ",
                  "doi: 10.15454/EX11NA", ", ",
                  "URL: https://CRAN.R-project.org/package=airGR."
                  )
)
