Get components of a date-time object
Arguments
- time
a date-time object
- components
a character vector of components to return. Component is one of "year", "month", "yday", "day", "mday", "wday", "hour", "minute", "second" where "day" is the same as "mday".
- week_start
week starting day (Default is 1, Monday). Set
timechange.week_startoption to change this globally.
Examples
x <- as.POSIXct("2019-02-03")
time_get(x)
#> year month yday mday wday hour minute second
#> 1 2019 2 34 3 6 0 0 0