x <- date_yq(2016, 2)
get_year(x)
if (FALSE) {
library(lubridate)
year(x)
}
x <- date_yq(2016, 2)
get_quarter(x)
if (FALSE) {
library(lubridate)
quarter(x)
}
x <- date_yq(2016, 2)
get_month(x)
if (FALSE) {
library(lubridate)
month(x)
}
x <- date_yw(2016, 2)
get_isoweek(x)
get_isoyear(as.Date("2018-01-01"))
get_isoyear(as.Date("2016-01-01"))
Run the code above in your browser using DataLab