About

The Calendar Database

The database comes as a zipped script which includes all of the database objects and the data. It will install on SQL Server 2008 and later. A few people have already downloaded an earlier version of this database.

The Calendar1 database begins on January 1, 2009 and extends through June 6, 2031. The Calendar3 database now has more than 8,200 dates and almost 2,500 holidays. You will need to create your own Calendar1 database, then run the script to create the tables and fill them with data.

Download the Calendar1 database Script(zip 434 KB).

There is more information about Calendar1 in the "About" or at: DatabaseZone.com.

Most of the script code which originally calculated the holidays is mine, although a lot of it is derived from the work of people too numerous to mention. By the way, since the original calendar table is generated by a script, changing a couple of numbers allows me to create a calendar with many more or many fewer dates, or a different starting date. I can also add, edit, or remove holidays in the script. Anyone can manually edit holidays individually in the finished table.

The script I have made available simply recreates the database and the three finished calendar tables including data. Any changes to the data will need to be made manually. The default name of the database is Calendar1. If you want the tables added to another database change Calendar1 to the name of your database in the script. If your database already exists, edit the first line of the script that points to (Uses) Calendar1.

If you wish me to create a custom calendar table, please contact me for a quote.

Calendar1 schema diagram

Pre-calculating and saving all of this information for each date simplifies all kinds of date calculations and makes it possible to access calendar data through normal data access code and business logic code.

The calendar includes secular, Christian, Jewish, Baha'i, and Muslim holidays. The major Islamic holidays are not computed but are determined by astronomic observation each year. The vagaries of visual observation can cause the date of a holy day to vary by a day from the date in this calendar.

The Calendar Application

This is a C# Web Forms application built in Visual Studio 2012. It was meant to be a demonstration of the Calendar Control. I spent a lot of time researching on the Web, only to find more bad information than good. When I finally got it working, I decided to share my version. At least I can demonstrate that it works.

The downloadable version of this application includes all of the active pages (AJAXCalendar, AJAXList, Maintenance, Help, and site.css). You will need to create your own Calendar3 application, and import the pages you want. The full project was just too big to post.

Download Calendar3Pages.zip (zip 15 KB).

The demo version of the application on this site has disabled UPDATE buttons for obvious reasons.

Notes

This entire application, including the database is available at no charge and with no restrictions. The project is intended for educational purposes, so I make no IP claims, and no warrenty is stated or implied.