Debian Codegraph @

man/ISOweek2date.Rd

raw
1 \name{ISOweek2date}
2 \alias{ISOweek2date}
3 \title{Converts date from week notation according to ISO 8601 to standard notation}
4 \usage{
5 ISOweek2date(weekdate)
6 }
7 \arguments{
8 \item{weekdate}{A character vector of year, week, and
9 weekday in format "\code{\%Y-W\%V-\%u}"}
10 }
11 \value{
12 A vector of class \code{Date}
13 }
14 \description{
15 This function returns the date of a given weekdate (year,
16 week of the year, day of week according to ISO 8601). It
17 is the inverse function to \code{date2ISOweek}.
18 }
19 \details{
20 According to ISO 8601, the year of the week can differ
21 from the calendar year (see the examples).
22 }
23 \examples{
24 w <- paste("2009-W53", 1:7, sep = "-")
25 data.frame(weekdate = w, date = ISOweek2date(w))
26 # convert from calendar date to week date and back to calendar date
27 x <- paste(1999:2011, "-12-31", sep = "")
28 w <- date2ISOweek(x)
29 d <- ISOweek2date(w)
30 data.frame(date = x, weekdate = w, date2 = d)
31 }
32 \author{
33 Uwe Block \email{[email protected]}
34 }
35 \seealso{
36 \code{\link{strptime}} for a description of the date
37 formats and references on ISO 8601.
38 }
39