Gets decimal day values for date/time vectors.

dtt_day_decimal(x, ...)

# S3 method for Date
dtt_day_decimal(x, ...)

# S3 method for POSIXct
dtt_day_decimal(x, ...)

Arguments

x

A date/time vector.

...

Unused.

Value

A numeric vector.

Methods (by class)

  • dtt_day_decimal(Date): Get numeric vector of decimal year values for a Date vector

  • dtt_day_decimal(POSIXct): Get numeric vector of decimal year values for a POSIXct vector

Examples

x <- as.POSIXct("1990-01-03 10:00:01")
dtt_day_decimal(x)
#> [1] 3.416678