Returns the serial date number that corresponds to the first (last) day in the next (last) weekend.
date is the serial date number that represents the date of concern. If missing or omitted, the current date is used.
weekends is the weekend-number or the seven-character code. If missing, Western weekend convention (weekend=1) is assumed.
holidays 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.
WKND_type 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).
|1||all (default): test for long and short weekends|
|2||ignore holidays; all weekends are short weekends|
|3||short/regular weekends only|
|4||long weekends only|
Return_type is a switch to select the return output (1 = next weekend (default), 2 = last weekend).
|1||next weekend (default)|
- 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 dates 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