File: calendar-nDay.Rd

package info (click to toggle)
r-cran-timedate 3012.100-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,592 kB
  • ctags: 4
  • sloc: makefile: 13
file content (52 lines) | stat: -rw-r--r-- 1,471 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
\name{nDay}
\title{n-th n-day Dates}

\alias{nDay}
\alias{timeNthNdayInMonth}
\alias{timeLastNdayInMonth}

\description{
    Computes the date for the n-th or last ocurrance of a
    n-day in year/month.
}
\usage{
timeNthNdayInMonth(charvec, nday = 1, nth = 1, format = "\%Y-\%m-\%d",
    zone = "", FinCenter = "")

timeLastNdayInMonth(charvec, nday = 1, format = "\%Y-\%m-\%d",
    zone = "", FinCenter = "")
}

\arguments{
  \item{charvec}{a character vector of dates and times.}
  \item{nday}{an integer vector with entries ranging from \code{0}
    (Sunday) to \code{6} (Saturday).}
  \item{nth}{an integer vector numbering the n-th occurence.}
  \item{format}{the format specification of the input character vector.}
  \item{zone}{the time zone or financial center where the data were recorded.}
  \item{FinCenter}{a character with the the location of the financial
    center named as "continent/city".}
}

\value{
  returns an object of class \code{timeDate}.

  For function \code{timeNthNdayInMonth} the \code{nth} ocurrance
  of a n-day (nth = 1,...,5) in \code{year}, \code{month}, and
  for \code{timeLastNdayInMonth} the last \code{nday} in \code{year},
  \code{month} will be returned.
}

\examples{
## timeNthNdayInMonth -
   # What date is the second Monday in April 2004 ?
   timeNthNdayInMonth("2004-04-01", 1, 2)

## timeLastNdayInMonth -
   # What date has the last Tuesday in May, 1996 ?
   timeLastNdayInMonth("1996-05-01", 2)
}


\keyword{chron}