| time-index-properties | R Documentation |
The following functions can be used to determine whether years are leap years, compute the number of subperiods within a period, and determine whether Daylight Saving Time is on for particular date-time index. All function are vectorised.
is.leap_year returns TRUE for leap years and FALSE for
non-leap ones.
days_in_year and weeks_in_year return the number of days
(365–366) and the number of weeks (52–53) in a year.
days_in_quarter and days_in_month return the number of days
in a quarter (90–92) or a month (28–31), respectively.
hours_in_day returns the number of hours in a day (24 most
of the time, a different number during DST/UTC offset changes).
is.dst returns TRUE when Daylight Saving Time is on
and FALSE otherwise.
is.leap_year(x)
days_in_year(x)
weeks_in_year(x)
days_in_quarter(x)
days_in_month(x)
hours_in_day(x, tz = NULL)
is.dst(x)
x |
an object of |
tz |
(optional) a character value determining the time zone (the default
|
is.leap_year and is.dst return logical vectors.
The remaining functions return integer vectors, except for hours_in_day,
which returns numeric vectors.
time-index-components, calendrical-computations,
Ops, tzone, bizdays_in_month.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.