File: calendar-onOrAfter.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 (83 lines) | stat: -rw-r--r-- 1,768 bytes parent folder | download | duplicates (5)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
\name{onOrAfter}


\title{OnOrAfter/Before Dates}


\alias{onOrAfter}
\alias{onOrBefore}

\alias{timeNdayOnOrAfter}
\alias{timeNdayOnOrBefore}


\description{
    
    Compute the date that is a "on-or-after" or "on-or-before" 
    ans n-day.
    
}


\usage{
timeNdayOnOrAfter(charvec, nday = 1, format = "\%Y-\%m-\%d", 
    zone = "", FinCenter = "")
    
timeNdayOnOrBefore(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{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}.
    
    \code{timeNdayOnOrAfter} returns the date in the specified month   
    that is a n-day (e.g. Sun-day) on or after the given date. Month
    and date are given through the argument \code{charvec}.
    
    For the function \code{timeNdayOnOrBefore} the date that is a n-day 
    on or before the given date will be returned.
       
}


\examples{
## Date as character String:
   charvec = "2006-04-16"
   
## timeNdayOnOrAfter
   # What date has the first Monday on or after March 15, 1986 ?
   timeNdayOnOrAfter("1986-03-15", 1)
    
## timeNdayOnOrBefore
   # What date has Friday on or before April 22, 1977 ?
   timeNdayOnOrBefore("1986-03-15", 5)
}


\keyword{chron}