Description Usage Arguments Details Value Author(s) Examples
This function extracts the ISO week and ISO year of a Date
according to the ISO 8601 specification. Note that this function
does nothing else than format.Date(x, "%G") and format.Date(x, "%V")
would do on Mac/Unix computers. However, this is not implemented
on Windows.
A small internal wrapper for format.Date
(called
formatDate
) thus directs all calls having one of these format
strings to this function, if the .Platform$OS.type
information reveals a Windows system. The function also provides three
additional strptime
formatting strings: "%Q" (the quarter of a
date as a numeric), "
(day within the quarter). These are, e.g., used by linelist2sts
.
1 | isoWeekYear(Y, M=NULL, D=NULL)
|
Y |
Date object (POSIX) or the year. Can be a vector. |
M |
month, |
D |
day, |
The code to find the ISO week and year on Windows is by Gustaf Rydevik <gustaf.rydevik_at_gmail.com> posted at http://tolstoy.newcastle.edu.au/R/e10/help/10/05/5588.html
A list with entries ISOYear
and ISOWeek
containing the
corresponding results.
Gustaf Rydevik
1 2 | dates <- as.Date(c("2002-12-31","2003-01-01","2003-01-06"))
isoWeekYear(dates)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.