Gets decimal hour values for date/time vectors.
Usage
dtt_hour_decimal(x, ...)
# S3 method for class 'Date'
dtt_hour_decimal(x, ...)
# S3 method for class 'POSIXct'
dtt_hour_decimal(x, ...)
# S3 method for class 'hms'
dtt_hour_decimal(x, ...)Methods (by class)
dtt_hour_decimal(Date): Get numeric vector of decimal hour values for a Date vectordtt_hour_decimal(POSIXct): Get numeric vector of decimal hour values for a POSIXct vectordtt_hour_decimal(hms): Get numeric vector of decimal hour values for a hms vector
Examples
x <- as.POSIXct("1990-01-02 23:40:51")
dtt_hour_decimal(x)
#> [1] 23.68083
x <- hms::as_hms("23:40:51")
dtt_hour_decimal(x)
#> [1] 23.68083
