Returns the serial date number that corresponds to the first (last) day in the next (last) weekend.
NxWKNDate(date, weekends, holidays, WKND_type, return)
- is the serial date number that represents the date of concern. If missing or omitted, the current date is used.
- is the weekend number or the seven-character code. If missing, Western weekend convention (weekend=1) is assumed.
- is an array of holiday dates, holiday codes (e.g., NYD, PRS), a calendar code (e.g., US, GBP, NYMEX), or any combination of them. If missing, the U.S. government calendar is used.
- is a switch to determine how to handle short or long weekends (1 = All (default), 2 = Ignore Holidays 3 = Only Short Weekends, 4 = Only Long Weekends).
Value WKND_type 1 All: test for long and short weekends (default). 2 Ignore holidays; all weekends are short weekends. 3 Short/regular weekends only. 4 Long weekends only.
- is a switch to select the return output (1 = Next Weekend (default), 2 = Last Weekend).
Value Return 1 Next weekend (default). 2 Last weekend.
- See Weekend for a list of supported weekends and their designated numbers/codes.
- See Holidays for a list of currently supported holidays.
- See Calendars for a list of currently supported calendars.
- If the given date falls on a weekend, NxWKNDate adjusts it either forward (next) or backward (last).
- The return date corresponds to the first weekend day when return-type = 1 (next).
- The return date corresponds to the last weekend day when return-type = 2 (last).
- Most functions automatically convert date values to serial numbers.
- If start_date is not a valid date, NxWKNDate returns the #VALUE! error value.
- If Calendar is not recognized (i.e., not supported), NxWKNDate returns the #VALUE! error value.
- Excel stores date as sequential serial numbers so they can be used in calculations. By default, January 1, 1900, is serial number 1, and January 1, 2008, is serial number 39448 because it is 39,448 days after January 1, 1900.
- Hans-Peter Deutsch, Derivatives and Internal Models, Palgrave Macmillan (2002), ISBN 0333977068.