Free-Cal

Introduction

Free-Cal is a simple calendar program. It doesn't try to "simplify your life." Instead, it just displays a calendar, sort of like the one in your check book. It's for those times when you want to know things like, "What's the third weekend in July?"

With that in mind, I setout to find a program that just displayed a calendar. Well, I couldn't find one. It seemed that the calendar program was always an adjunct to some other function, like appointment tracking, or sat in the system tray, or was too big and slow.

The goal was to keep Free-Cal small and fast. Free-Cal is just 55k. It can sit in your quick launch menu and launch as fast as if were memory resident. It can display one or more months and doesn't take up a lot of screen real-estate.

Free-Cal also keeps tracks of all federal holidays and many secular and religious events. You can edit the Free-Cal.ini file to add your own events. In a future release I hope to add a dialog to add and remove events without the need to edit the Free-Cal.ini file.

Version 1.3 adds controls to configure colors and fonts. It also sports a nifty new desktop mode that lets Free-Cal look like part of the desktop. And now you can set the first day of the week to Monday or Sunday. Keep those ideas coming!

Requirements

Windows 2000/XP.

Setup

Free-Cal is really just one program, an Ini file, and help file. Put them where you like. I added a setup program because Free-Cal does write some registry entries and I get annoyed when I can't uninstall a program easily if I decide I don't like it.

Support

You're kidding, right? Seriously though, if you have a problem and you ask nicely, I'll try to help. You can send email to mike@blueonionsoftware.com

Enjoy!


Free-Cal

Editing Free-Cal.Ini

Someday I'll add a user interface to add and remove events from the calendar. In the meantime, you can edit Free-Cal.Ini where the events are stored. Free-Cal.Ini is a plain text file. You can edit it with NotePad. Don't edit it with Word or WordPad. The file installed on your system looks like this:

[Fixed]
0101=New Year's Day
0317=St. Patrick's Day
0704=Independence Day
1111=Veterans' Day
1225=Christmas Day
0106=Epiphany
0202=Groundhog Day
0214=Valentine's Day
0425=Secretary's Day
0501=May Day
0614=Flag Day
0815=Assumption
1006=German-American Day
1031=Halloween
1101=All Saints' Day
1208=Immaculate Conception
1224=Christmas Eve
1231=New Year's Eve

[Movable]
1,2,3=Martin Luther King Day
2,2,3=President's Day
5,2,5=Memorial Day
9,2,1=Labor Day
10,2,2=Columbus Day
11,5,4=Thanksgiving
4,1,1=Daylight Savings Time Begins
5,1,2=Mother's Day
6,1,3=Father's Day
10,1,5=Daylight Savings Time Ends
11,1,1=New York Marathon
E-47=Mardi Gras
E-46=Ash Wednesday
E-7=Palm Sunday
E-2=Good Friday
E=Easter
E+1=Easter Monday
E+39=Ascension
E+49=Pentecost
E+60=Corpus Christi
A=1st Advent
A+7=2nd Advent
A+14=3rd Advent
A+21=4th Advent
SP=First Day of Spring
SU=First Day of Summer
FA=First Day of Autumn
WI=First Day of Winter

The programmers among you will recognize this as a Windows private profile. The format is self-evident. The events listed under the [Fixed] heading are just that, fixed. Meaning that they occur on the same date every year. The format is:

mmdd=description

where: mm is the two digit month (1=January)
dd is the month day (1-31)
description is what appears in the popup menu

Movable events occur relative to another date. Columbus day, for instance, occurs on the second Monday of October. These are relatively straight forward to calculate.

Easter is another story and can make for an interesting research topic. There are several algorithms devised over the centuries to capture just when Easter occurs. The rule is generally the first Sunday after the first full moon after the Spring equinox. But there are exceptions. Perhaps the easiest and best know algorithm is Butcher's, devised in the 18 century by a mathematician of the same name. It is certainly the most straightforward to implement.

For the solstice and equinox calculations, you have to look to a book on astronomical calculations. The calculation is a complicated and required a some 64-bit math to get it to work without too many round-off errors (so much for my "simple" calendar program".

Moveable dates come in four flavors. The first events (like Memorial day) are relative to some day of the week (like the last Monday in May). The format is:

mm,wd,nth=description

where: mm is a one or two digit month (1-12)
wd is the week day (1=Sunday, 2=Monday)
nth is the week of the month it occurs (1-5 where 5 is means the last week of the month)

E is Easter. Many religious events occur as an offset from Easter. Add or subtract the desired number of days.

A is for advent. Same rules as Easter.

SP is the Spring equinox
SU is the Summer solstice
FA is the Fall equinox
WI is the Winter solstice

Don't worry to much about messing up the file. Free-Cal simply ignores any line it doesn't understand.


End User License Agreement

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  • The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  • Altered versions must be plainly marked as such, and must not be misrepresented as being the original software.
  • This notice may not be removed or altered from any distribution.

Copyright (C) 2003 Blue Onion Software


Free-Cal

Usage

I personally like to put a shortcut to Free-Cal in the quick launch menu. Then it is always handy. Free-Cal remembers it last window position and size. It also has an "Always on Top" setting which it also remembers.

When you start Free-Cal, it displays a single current month. You can change the window size to display up to 12 months in any arrangement you choose. Free-Cal has no menu bar like most traditional programs. It just takes up screen real-estate and is not really necessary for a simple program like Free-Cal. Instead, you can click the icon in the upper right corner, or right click anywhere on the program. It will drop down a menu like the one pictured below.

If you move your cursor over a day that is in bold-face, a small window indicating the event or events for that day will appear. Free-Cal displays all federal holidays, and many secular and religious events as well. This information is stored in the Free-Cal.ini file, which you can edit.

The window is resizable and will place as many months as can fit in the given area (up to 12). It also remembers its last position and size.

Version 1.3 introduces a new feature called desktop mode. When activated, Free-Cal will blend with the desktop. It's something of an experimental feature so I imagine it will need some refinements. Try it and send me your suggestions. Here's an example:

Another nice addition (it's about time Mike) is manually setting the first day of the week to either Sunday or Monday. Some of you folks on in other countries have told me the default windows settings are not to your liking.

color dialog You can set most of the color elements of the calendar now. I won't go into great detail. Experiment with the dialog and you'll figure it out. In addition to colors, you can set the transparancy of the calendar and decide if the background should be transparent. Both settings need a little explaining. The transparency slider will set the overall "transluence" of the calendar. This affects all elements. The "Transparent Background" checkbox will make the background of the calendar completely transparent. The transparent option presents one difficulty I could never work around. When the background is transparent, the program does not receive mouse messages. This means context menus and tool tips did not work as expected. To get around the problem, I make the background semi-transparent when mouse movement is detected. This allows menus and tool tips to work as expected. When the mouse is detected leaving the calendar area, the background reverts to transparent. It really bugs me to this and I spent quite a bit of time trying to work around it with no success. I don't know, some of you may even like the behavior.

The font dialog is your standard Windows font dialog. The same font is used for all elements of the calendar. I added this at the last moment and to my surprise, it is one of my favorite options. You can now stylize your calendar to reflect your own personal tastes.

There are a number of keyboard shortcuts. Here's what Microsoft says about user interface:

Scrolling the control's display.

By default, when a user clicks the arrow buttons in the top left or top right of the month calendar control, the control updates its display to show the previous or next month. If the month calendar control is displaying more than one month at a time, the display changes by the number of months currently in view. That is, if the month calendar displays January, February, and March and the user clicks the top right arrow button, the control updates its display to show April, May, and June. The user can also perform the same action by clicking the partial months displayed before the first month and after the last month.

The following keyboard commands can also be used to change the current month.

PAGE UP (VK_NEXT)
Move to the next month.

PAGE DOWN (VK_PRIOR)
Move to the previous month.

HOME (VK_HOME)
Move to the first day of the current month.

END (VK_END)
Move to the last day of the current month.

CTRL + HOME
Move to the first visible month.

CTRL + END
Move to the last visible month.

Selecting a nonadjacent month.

When a user clicks the name of a displayed month, a pop-up menu appears that lists all months within the year. The user can select a month on the list. If the user's selection is not visible, the month calendar control scrolls its display to show the chosen month.

Selecting a different year.

If the user clicks the year displayed next to a month name, an up-down control appears in place of the year. The user can change the year with this control. The month calendar control updates its display for the selected year when the up-down control loses focus. The related keyboard commands are:

CTRL + VK_NEXT
Move to the next year.

CTRL + VK_PRIOR Move to the previous year.

Selecting the current day.

The user can return to the current day by clicking the "Today" text at the bottom of the control. If the current day is not visible, the control updates its display to show it. Related keyboard commands are:

VK_LEFT
Move to the previous day.

VK_RIGHT.
Move to the next day.

VK_UP
Move to the previous week.

VK_DOWN
Move to the next week.