time_get {timechange} | R Documentation |
Get components of a date-time object
Description
Get components of a date-time object
Usage
time_get(
time,
components = c("year", "month", "yday", "mday", "wday", "hour", "minute", "second"),
week_start = getOption("timechange.week_start", 1)
)
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
|
Value
A data.frame of the requested components
Examples
x <- as.POSIXct("2019-02-03")
time_get(x)
[Package timechange version 0.3.0 Index]