Learn R Programming

dint (version 2.1.4)

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 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)

Value

a Date

Arguments

x

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

Examples

Run this code
first_of_year("2016-06-04")
last_of_year("2016-06-04")

Run the code above in your browser using DataLab