posixt-boundary | R Documentation |
This is a POSIXct/POSIXlt method for the date_start()
and date_end()
generics.
## S3 method for class 'POSIXt'
date_start(
x,
precision,
...,
invalid = NULL,
nonexistent = NULL,
ambiguous = x
)
## S3 method for class 'POSIXt'
date_end(x, precision, ..., invalid = NULL, nonexistent = NULL, ambiguous = x)
x |
A date-time vector. |
precision |
One of:
|
... |
These dots are for future extensions and must be empty. |
invalid |
One of the following invalid date resolution strategies:
Using either If If |
nonexistent |
One of the following nonexistent time resolution strategies, allowed to be either length 1, or the same length as the input:
Using either If If |
ambiguous |
One of the following ambiguous time resolution strategies, allowed to be either length 1, or the same length as the input:
Alternatively, Finally, If If |
x
but with some components altered to be at the boundary value.
x <- date_time_build(2019:2021, 2:4, 3:5, 4, 5, 6, zone = "America/New_York")
x
# Last moment of the month
date_end(x, "month")
# Notice that this is different from just setting the day to `"last"`
set_day(x, "last")
# Last moment of the year
date_end(x, "year")
# First moment of the hour
date_start(x, "hour")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.