The beginning (floor) of the decade

floor_decade(x)

Arguments

x

a POSIXct, POSIXlt, Date, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, or fts object.

Value

the beginning of the decade as a Date object

Examples

floor_decade("2017-10-22 15:01:00")
#> [1] "2010-01-01 UTC"