date-and-date-time-boundary: Boundaries: date and date-time

Description Usage Arguments Value Examples

Description

There are separate help pages for computing boundaries for dates and date-times:

Usage

1
2
3
date_start(x, precision, ...)

date_end(x, precision, ...)

Arguments

x

[Date / POSIXct / POSIXlt]

A date or date-time vector.

precision

[character(1)]

A precision. Allowed precisions are dependent on the input used.

...

These dots are for future extensions and must be empty.

Value

x but with some components altered to be at the boundary value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# See type specific documentation for more examples

x <- date_build(2019, 2:4)

date_end(x, "month")

x <- date_time_build(2019, 2:4, 3:5, 4, 5, zone = "America/New_York")

# Note that the hour, minute, and second components are also adjusted
date_end(x, "month")

clock documentation built on Sept. 21, 2021, 5:10 p.m.