## easter -
xmpBasics("Start: Easter and Easter Related Feasts > ")
# Dates for Easter and Pentecost from 2000 until 2010:
easter(2000:2010)
GoodFriday = easter(2000:2010, -2) # Tis is Good Friday
GoodFriday
holiday(2000:2010, "Easter")
holiday(2000:2010, "GoodFriday")
## holidays -
xmpBasics("Next: Alternatively You can use > ")
Easter(2000:2010)
GoodFriday(2000:2010)
## holiday.NYSE -
xmpBasics("Next: Holiday Calendar for the New York Stock Exchange > ")
holiday.NYSE()
## on.or.after -
xmpBasics("Start: on.or.after > ")
# What date had the first advent 2001?
# The first advent is the Sunday on or after November 27th.
on.or.after(year = 2001, month = 11, day = 27, nday = 0)
## on.or.before -
xmpBasics("Next: on.or.before > ")
# What date had Monday on or after April, 1st, 2001?
on.or.before(year = 2001, month = 11, day = 27, nday = 1)
## nth.of.nday -
xmpBasics("Next: nth.of.nday > ")
# What date had the second Sunday in October 1980?
nth.of.nday(year = 1980, month = 10, nday = 0, nth = 2)
Continue = xmpBasics("Press any key > ")
## last.of.nday -
xmpBasics("Next: last.of.nday > ")
# What date had the last Monday in September, 2002?
last.of.nday(year = 1996, month = 9, lastday = 31, nday = 1)
## fdates -
## fjulian -
xmpBasics("Start: Convert Formatted Gregorian Dates > ")
fdates = c("8/11/73", "08-11-73", "August 11 1973", "Aug11/73")
fdates
fjulian(fdates)
## fdates -
## fjulian -
xmpBasics("Next: Convert with 'dmy' Order > ")
fdates = c("11/8/73", "11-08-73", "11 August 1973", "11Aug73")
fjulian(fdates, order = 'dmy')
## .julian -
## day.of.week -
xmpBasics("Next: Day of Week > ")
# The number of days from January 1, 1990 to each of:
# January 15, 1990, February 15, 1991, March 15, 1992, etc.
.julian(1:12, rep(15,12), 1990+(0:11), origin = c(1, 1, 1990))
# November 12, 98, was a Wednesday.
day.of.week(m = 11, d = 12, y = 98)
Run the code above in your browser using DataLab