create_date.Rd
Create an interval of date from a vector
create_date(...)
Anything that will be coerced to a character. See details for format.
A vector of two dates of format "\
Inputs are transformed in character vector, that we call x. When cretaed, x shall be vector of characters with date in format "\ "\ completed, if necessary, as to be the beginning of period "\ "\ necessary, as to be the maximum of period "\ "\ month).
create_date(2020)
#> [1] "2020-01-01" "2020-12-31"
create_date(1995:2000)
#> [1] "1995-01-01" "2000-12-31"
create_date(1995, 2000)
#> [1] "1995-01-01" "2000-12-31"
create_date("1995", "2000-02")
#> [1] "1995-01-01" "2000-02-29"
create_date("2000-02")
#> [1] "2000-02-01" "2000-02-29"
create_date("2000-02", "2000-02-15")
#> [1] "2000-02-01" "2000-02-15"
create_date("2000-02-15")
#> [1] "2000-02-15" "2000-02-15"
if (FALSE) create_date("toto")