powered by
Computes the date for the n-th or last occurrence of an n-day in year/month.
timeNthNdayInMonth(charvec, nday = 1, nth = 1, format = "%Y-%m-%d", zone = "", FinCenter = "")timeLastNdayInMonth(charvec, nday = 1, format = "%Y-%m-%d", zone = "", FinCenter = "")
timeLastNdayInMonth(charvec, nday = 1, format = "%Y-%m-%d", zone = "", FinCenter = "")
an object of class "timeDate"
"timeDate"
a character vector or object from a class representing time, such as "timeDate", "POSIXlt", etc.
"POSIXlt"
an integer vector with entries ranging from 0 (Sunday) to 6 (Saturday).
0
6
an integer vector numbering the n-th occurence.
the format specification of the input character vector.
the time zone or financial center where the data were recorded.
a character with the location of the financial center named as “continent/city”.
timeNthNdayInMonth returns the nth occurrence of a n-day (nth = 1,...,5) in year, month.
timeNthNdayInMonth
nth
year
month
timeLastNdayInMonth returns the last nday in year, month.
timeLastNdayInMonth
nday
trunc.timeDate,
trunc.timeDate
timeFirstDayInMonth, timeLastDayInMonth, timeFirstDayInQuarter, timeLastDayInQuarter,
timeFirstDayInMonth
timeLastDayInMonth
timeFirstDayInQuarter
timeLastDayInQuarter
timeNdayOnOrAfter, timeNdayOnOrBefore
timeNdayOnOrAfter
timeNdayOnOrBefore
## What date is the second Monday in April 2004? timeNthNdayInMonth("2004-04-01", 1, 2) ## What date has the last Tuesday in May, 1996? timeLastNdayInMonth("1996-05-01", 2)
Run the code above in your browser using DataLab