dtt_date {dttr2}R Documentation

Date

Description

Coerces vectors to floored Date vectors.

Usage

dtt_date(x, ...)

dtt_date(x) <- value

## S3 method for class 'integer'
dtt_date(x, ...)

## S3 method for class 'double'
dtt_date(x, ...)

## S3 method for class 'character'
dtt_date(x, ...)

## S3 method for class 'Date'
dtt_date(x, ...)

## S3 method for class 'POSIXct'
dtt_date(x, ...)

## S3 method for class 'hms'
dtt_date(x, ...)

## S3 replacement method for class 'Date'
dtt_date(x) <- value

## S3 replacement method for class 'POSIXct'
dtt_date(x) <- value

dtt_set_date(x, value)

## S3 replacement method for class 'Date'
dtt_time(x) <- value

## S3 replacement method for class 'POSIXct'
dtt_time(x) <- value

Arguments

x

A vector.

...

Unused.

value

A date vector.

Value

A floored Date vector.

Methods (by class)

Examples

dtt_date(1L)
dtt_date(-1)
dtt_date("2000-01-01")
as.Date(as.POSIXct("2019-05-01", tz = "Etc/GMT-8"))
dtt_date(as.POSIXct("2019-05-01", tz = "Etc/GMT-8"))
dtt_date(hms::as_hms("23:59:59"))
dtt_date(hms::as_hms("24:00:00"))

[Package dttr2 version 0.3.0 Index]