week52: week52

Description Usage Arguments Details Value Examples

View source: R/week52.R

Description

Get/Set week of a date-time with consistent 52 week years

Usage

1
week52(x)

Arguments

x

a data-time object; Must be a POSIXct, POSIXlt, Date, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, or fts object.

Details

Same as week, but maps 53 -> 52 for libraries that require a consistent measure for weeks.

Value

integer

Examples

1
2
3
  x <- seq( ymd(20011231), ymd(20301231), "year" )
  lubridate::week(x)
  week52(x)

decisionpatterns/lubridate.tools documentation built on July 30, 2020, 4:24 a.m.