Learn R Programming

dint (version 2.0.0)

first_of_year: Get First / Last Day of a Year

Description

Get First / Last Day of a Year

Usage

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 integer last_of_year(x)

# S3 method for default last_of_year(x)

# S3 method for numeric last_of_year(x)

Arguments

x

Anything that can be coerced to a date with base::as.Date()

Value

a Date

Examples

Run this code
# NOT RUN {
first_of_year("2016-06-04")
last_of_year("2016-06-04")
# }

Run the code above in your browser using DataLab