first_of_isoweek {dint}R Documentation

Get First / Last Day of an Isoweek

Description

first_of_yw() is equivalent with first_of_isoweek() and only included for symmetry with first_of_yq() and first_of_ym().

Usage

first_of_isoweek(x)

## Default S3 method:
first_of_isoweek(x)

last_of_isoweek(x)

## Default S3 method:
last_of_isoweek(x)

first_of_yw(x, w = NULL)

last_of_yw(x, w = NULL)

Arguments

x

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

w

Two integer (vectors). w is optional and the interpretation of x will depend on whether w is supplied or not:

  • if only x is supplied, x will be passed to as_date_yw() (e.g. x = 201604 means 4th isoweek of 2016)

  • if x and w are supplied, x is interpreted as year and w as week.

Value

a Date

See Also

first_of_isoweek()

Examples

first_of_isoweek("2016-06-04")
last_of_isoweek("2016-06-04")
first_of_yw(2016)
first_of_yw(2016)

[Package dint version 2.1.3 Index]