week
From lubridate v1.2.0
by Garrett Grolemund
Get/set weeks component of a date-time.
Date-time must be a POSIXct, POSIXlt, Date, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, and fts objects. Weeks is the number of complete seven day periods that have occured between the date and January 1st, plus one.
Usage
week(x)
Arguments
- x
- a date-time object
Value
- the weeks element of x as an integer number
Examples
x <- ymd("2012-03-26")
week(x)
week(x) <- 1
week(x) <- 54
week(x) > 3
Community examples
Looks like there are no examples yet.