dateFromWeek: Return the dates of a particular week

Description Usage Arguments Value Author(s) See Also Examples

View source: R/dateFromWeek.R

Description

Returns the dates of a particular week. The week can be defined by ISO week or epi week.

Usage

1
dateFromWeek(year, wkIndex, wkMethod = "ISO")

Arguments

year

a value for the year.

wkIndex

a value for the week index of the year.

wkMethod

a character string for the week-counting method. Default is "ISO" for ISO-week; other options are "epiSat", "epiSun" and "epiMon" for epi-week method defining Saturday, Sunday and Monday as the firstday in a week, respectively.

Value

a vector of length 7, containing all the dates in the week, with the format of yyyy-mm-dd.

Author(s)

You Li

See Also

weekToMonth

Examples

1
2
3
dateFromWeek(year = 2000, wkIndex = 20)
dateFromWeek(year = 2009, wkIndex = 53)
dateFromWeek(year = 2015, wkIndex = 1, wkMethod = "epiSun")

wktmo documentation built on May 1, 2019, 8:04 p.m.