dtt_date_time: Date Time

Description Usage Arguments Value Methods (by class) Examples

View source: R/date-time.R

Description

Coerces vectors to floored POSIXct vectors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
dtt_date_time(x, ...)

## S3 method for class 'integer'
dtt_date_time(x, tz = dtt_default_tz(), ...)

## S3 method for class 'double'
dtt_date_time(x, tz = dtt_default_tz(), ...)

## S3 method for class 'character'
dtt_date_time(x, tz = dtt_default_tz(), ...)

## S3 method for class 'Date'
dtt_date_time(x, time = hms::as_hms("00:00:00"), tz = dtt_default_tz(), ...)

## S3 method for class 'POSIXct'
dtt_date_time(x, tz = dtt_tz(x), ...)

## S3 method for class 'hms'
dtt_date_time(x, date = dtt_date("1970-01-01"), tz = dtt_default_tz(), ...)

Arguments

x

A vector.

...

Unused.

tz

A string of the time zone.

time

A hms vector of the time.

date

A Date vector of the date.

Value

A floored POSIXct vector.

Methods (by class)

Examples

1
2
3
4
5
dtt_date_time(1L)
dtt_date_time(-1)
dtt_date_time(1, tz = "Etc/GMT+8")
dtt_date_time(as.Date("2000-01-02"))
dtt_date_time(as.Date("2000-01-02"), time = hms::as_hms("04:05:06"))

dttr2 documentation built on July 10, 2020, 5:06 p.m.