Gets and sets day values for date/time vectors.
Usage
dtt_day(x, ...)
dtt_day(x) <- value
# S3 method for class 'Date'
dtt_day(x, ...)
# S3 method for class 'POSIXct'
dtt_day(x, ...)
# S3 method for class 'Date'
dtt_day(x) <- value
# S3 method for class 'POSIXct'
dtt_day(x) <- value
dtt_days(x, ...)
dtt_days(x) <- value
dtt_set_day(x, value)
Methods (by class)
dtt_day(Date)
: Get integer vector of day values for a Date vectordtt_day(POSIXct)
: Get integer vector of day values for a POSIXct vector
Functions
dtt_day(Date) <- value
: Set day values for a Date vectordtt_day(POSIXct) <- value
: Set day values for a POSIXct vector
See also
Other set date:
dtt_months()
,
dtt_years()
Examples
x <- as.Date("1990-01-02")
dtt_day(x)
#> [1] 2
dtt_day(x) <- 27L
x
#> [1] "1990-01-27"
x <- as.POSIXct("1990-01-02 23:40:51")
dtt_day(x)
#> [1] 2
dtt_day(x) <- 27L
x
#> [1] "1990-01-27 23:40:51 UTC"