NxIsWeekend - Check given date for Weekends

Returns TRUE if the reference date falls on a weekend.

 

Syntax

NxIsWeekend(date, weekend, holidays, Option)

date is the serial date number that represents the date of concern. If missing, the current date is used.

weekend is a number or string specifying when weekends occur. If missing, weekend = 1 (Western weekends) is used.

holidays is an array of holiday dates, codes (e.g. NYD, USA-PRS, etc) or a calendar code (e.g. USA, GBP, etc.). If missing, the U.S. government calendar is used.

Option is a switch to specify how to test for short or long weekends (1 = all (default), 2 = ignore holidays, 3 = only short weekends, 4 = only long weekends).

Method Description
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
 

Remarks

  1. See Weekend for a list of supported weekends and their designated numbers/codes.
  2. Most functions automatically convert date values to serial numbers.
  3. If start_date is not a valid date, NxIsWeekend returns the #VALUE! error value.
  4. If the weekends code is not recognized (i.e. not supported), NxIsWeekend returns the #VALUE! error value.
  5. If the weekends code references a calendar (e.g. US, USD, etc.), the weekend code/number of the calendar is used.
  6. 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.

Examples

  Formula Description (Result)
  =NxIsWeekend(2010-12-12) TRUE
  =NxIsWeekend(2010-12-13) FALSE

Files Examples

References

External Links

Have more questions? Submit a request

0 Comments