The function converts a date (day, month, year) to Calendar Day (day of year).
day_of_year(day, format = "%Y-%m-%d")
character
numerical date in standard format (e.g. "2017-01-02"
, "01-02"
, "01/02/2017"
etc).
character
date format following as.POSIXlt
conventions. Default value = "%Y-%m-%d"
.
numeric
Julian day number, 1-366 (e.g. 1 for January 1st).
Other utility functions:
airpressure_from_elev()
,
azimuth_angle()
,
daylength()
,
dec_angle()
,
solar_noon()
,
temperature conversions
,
zenith_angle()
day_of_year(day = "2017-04-22",
format = "%Y-%m-%d")
#> [1] 112
day_of_year(day = "2017-04-22")
#> [1] 112
day_of_year(day = "04/22/2017",
format = "%m/%d/%Y")
#> [1] 112