week

0th

Percentile

Get/set weeks component of a date-time.

Get/set weeks component of a date-time.

Keywords
manip, utilities, chron
Usage
week(x)
Arguments
x
a date-time object
Details

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.

Value

  • the weeks element of x as an integer number

Aliases
  • week<-
  • week<-.default
  • week<-.Date
  • week<-.chron
  • week<-.zoo
  • week<-.its
  • week<-.ti
  • week<-.timeDate
  • week<-.jul
  • week<-.timeSeries
  • week<-.fts
  • week<-.irts
  • week
Examples
x <- now()
week(x) 
week(x) <- 1  
week(x) <- 54
week(x) > 3
Documentation reproduced from package lubridate, version 0.1, License: GPL

Community examples

Looks like there are no examples yet.