View source: R/compute_day_number.R
compute_day_from_date | R Documentation |
Computes the day number corresponding to a given date (or vector of) from the first day of a start year. Typically, the start year should be the year of a STICS simulation start. Leap years are properly handled.
compute_day_from_date(
date,
start_year = NULL,
start_date = lifecycle::deprecated()
)
date |
date(s) vector to be converted,
in the character format ("YYYY-MM-DD") or |
start_year |
year to be used as time reference (simulation start year). Optional. |
start_date |
numeric vector
Timothee Flutre
date <- as.Date("2015-02-10")
compute_day_from_date(date = date)
compute_day_from_date(date = "2015-02-10", start_year = 2014)
date <- as.Date("2009-02-10")
compute_day_from_date(date = date, start_year = 2008 )
dates <- c(as.Date("2008-02-10"), as.Date("2009-02-10"))
compute_day_from_date(date = dates, start_year = 2008 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.