yday_366 | R Documentation |
yday_366
returns an integer between 1 and 366 representing the day of the year number of x
.
yday_366(x)
x |
A Date object |
In contrast to lubridate::yday
, yday_366
considers the length
of all years to be 366 days. In non leap years, there is no day 60 (29
February) and 1 March is always day 61.
This convention is often used for weather data and other applications. It's advantage is that all days have the same day number regardless of the year e.g. 31 December is always day 366, even in non leap years. This may be desirable, for example, when comparing day of year numbers across years that contain leap years and non leap years.
An integer between 1 and 366 representing the day of the year number of x
.
yday_366(as.Date("1999-03-01"))
yday_366(as.Date("2000-12-31"))
yday_366(as.Date("2005-12-31"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.