R/year_week.R
year_week.Rd
Get year and week number from an object.
year_week(x)
An object.
A named list with two elements: year and week.
year
week
x <- as_weeknumber(c(-1:1, 51:52, NA)) year_week(x)#> $year #> [1] 1999 2000 2000 2000 2001 NA #> #> $week #> [1] 52 1 2 52 1 NA #>