JonC 101 / JavaScripts / Date Calculator
Core Parameters Results
Base Date Click to choose the date from a calendar popup
Days Away
 
 
Days of the Week
Included
(Weekdays)
Excluded
(Weekends)

Excluded Dates
(Holidays)

Instructions
This date calculator is designed to answer the question, "What is X business days from now?" To use it, simply
  1. Enter in the Base Date to count from (or use the calendar widget to select a date)
  2. Enter in the Days Away to count from the Base Date
  3. Click Calculate, and the results will appear in the results area.
Advanced Instructions

If the calculate function is not working, check your security settings. It needs to allow Java/ActiveX scripting or something like that.

The basic method behind the algorithm is to start from the Base Date and keep stepping to the next day for "Days Away" number of steps. However, any days passed by which are "non-business days" are skipped. A business day is generally defined as a weekend or holiday.

It is not necessary to use that definition of business day however. The calculator is very flexible in allowing the specification of which days and/or dates should be excluded and skipped in the counting.

Use the "Days of the Week" controls to select which days should be included (e.g. weekdays) and which should be excluded (e.g. weekends) in the counting.

Use the "Excluded Dates" controls to define which specific dates count as holidays that should be excluded from the counting.

Download the Calendar Popup Control
Download the Java class source for the business days calculator