dtt_floor {dttr2}R Documentation

Floor

Description

Floors a date/time vector

Usage

dtt_floor(x, units, ...)

## S3 method for class 'Date'
dtt_floor(x, units = "days", ...)

## S3 method for class 'POSIXct'
dtt_floor(x, units = "seconds", ...)

## S3 method for class 'hms'
dtt_floor(x, units = "seconds", ...)

Arguments

x

A date/time vector.

units

A string of the units to floor by.

...

Unused.

Value

The floored date/time vector.

Methods (by class)

Examples

dtt_floor(hms::as_hms("23:59:59"), "hours")

[Package dttr2 version 0.3.0 Index]