Debian Codegraph @

man/ISOweek.Rd

raw
1 \name{ISOweek}
2 \alias{ISOweek}
3 \title{Week of the year according to ISO 8601}
4 \usage{
5 ISOweek(date)
6 }
7 \arguments{
8 \item{date}{Vector which can be coerced to class
9 \code{Date}}
10 }
11 \value{
12 A character vector of year and week in format
13 "\code{\%Y-W\%V}"
14 }
15 \description{
16 This function returns the year and the week of the year
17 of a given date according to ISO 8601. It is an
18 substitute for the \code{\%Y-W\%V} format which is not
19 implemented on Windows.
20 }
21 \details{
22 According to ISO 8601, the year of the week can differ
23 from the calendar year (see the examples).
24 }
25 \examples{
26 x <- paste(1999:2011, "-12-31", sep = "")
27 y <- as.Date(x)
28 data.frame(date = format(y), week = ISOweek(y))
29 data.frame(date = x, week = ISOweek(x))
30 }
31 \author{
32 Hatto von Hatzfeld \email{[email protected]}, adopted
33 to \R by Uwe Block \email{[email protected]}
34 }
35 \references{
36 \url{http://www.salesianer.de/util/kalwoch.html}
37 }
38 \seealso{
39 \code{\link{strptime}} for a description of the date
40 formats and references on ISO 8601.
41 \code{\link[surveillance]{isoWeekYear}} for an
42 alternative implementation.
43 }
44