dateFromWeek {wktmo}R Documentation

Return the dates of a particular week

Description

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

Usage

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

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

[Package wktmo version 1.0.5 Index]