R. E. Cook
Contact Us 

Dr. Cook

RunningShoes Library for WinRunner 

Custom WinRunner Functions 
and Utilities,
to Your Specs

A Random Collection of WinRunner Solutions

Creating DLLs for WinRunner 
"DLLs Demystified" 
(Mercury Interactive's Worldwide Users Conference 2000)

R. E. Cook Consulting


Is a Given Date a Business Day?

Functions: IsBusinessDay(), JulIsBusinessDay(), WrIsBusinessDay()

Testing a financial application that makes payments on the first business day of the month? Or a database payroll procedure that runs on the 15th of every month if it is a business day, or the first business day thereafter if it isn't? How about a mortgage banking application that automatically debits accounts on the last business day of the month? 

In your automated testing, how do you tell if a date is a business day?

The IsBusinessDay functions will determine whether the given input date is a business day in the US financial world. Two other related functions will find the first and last business days in a given month: FirstBusinessDay() and LastBusinessDay().

Financial markets are closed on weekends and on nine recognized holidays during the year. If any of these holidays falls on a weekend, the nearest weekday is a market holiday, e.g., if January 1 is a Sunday, markets are closed Monday, January 2. Or, if July 4 is a Saturday, Independence Day is celebrated Friday, July 3, as a market holiday.

Market holidays defined

Market Holiday


New Year's Day

January 1

Martin Luther King's Birthday

Third Monday of January

President's Day

Third Monday of February

Good Friday

Friday before Easter. Easter is the first Sunday on or after the first full moon of Spring, in the Gregorian calendar.

Memorial Day

Last Monday in May

Independence Day

July 4

Labor Day

First Monday of September


Fourth Thursday of November


December 25

The three flavors of the IsBusinessDay function differ only in how the date is input. IsBusinessDay() accepts year, month, day parameters, WrIsBusinessDay() accepts a standard WinRunner date number, and JulIsBusinessDay() accepts a Julian date.

Updated 17 January 2005

Top of  This Page | R. E. Cook Home Page

Copyright R. E. Cook Consulting, 2000 - 2011.
All rights reserved.

The site is designed to look best when viewed with Internet Explorer 5.0 - 8.0. Results with other browsers will probably deviate from what is intended.

NOTE: This website refers to registered trademarks and service marks that are owned by other companies, including Mercury Interactive, WinRunner, TestDirector, TSL, Microsoft, Windows.