dtt_add_units {dttr2}R Documentation

Add Units

Description

Add time units to a date time vector.

Usage

dtt_add_units(x, units, n = 1L)

dtt_add_years(x, n = 1L, ...)

dtt_add_months(x, n = 1L, ...)

dtt_add_days(x, n = 1L, ...)

dtt_add_hours(x, n = 1L, ...)

dtt_add_minutes(x, n = 1L, ...)

dtt_add_seconds(x, n = 1L, ...)

Arguments

x

A date time vector.

units

A string of the units.

n

An integer of the number of units.

...

Unused.

Value

The modified date time vector.

See Also

dtt_subtract_units()

Examples

dtt_add_units(as.Date("1999-12-31"), "days")

[Package dttr2 version 0.3.0 Index]