Get First / Last Day of a Year
first_of_year(x) # S3 method for date_xx first_of_year(x) # S3 method for integer first_of_year(x) # S3 method for default first_of_year(x) # S3 method for numeric first_of_year(x) last_of_year(x) # S3 method for date_xx last_of_year(x) # S3 method for integer last_of_year(x) # S3 method for default last_of_year(x) # S3 method for numeric last_of_year(x)
x | Anything that can be coerced to a date with |
---|
a Date
first_of_year("2016-06-04")#> [1] "2016-01-01"last_of_year("2016-06-04")#> [1] "2016-12-31"