CDAY User Documentation

Cheshiresoft Calendar-Almanac version 1.20 pre1
Copyright (c) by Andrew Ziem 2003. All rights reserved.

"With CDAY your days are numbered!"


The Cheshiresoft Calendar-Almanac (referred to as "CDAY") reports what happened in history, whose birthday it is, religious happenings and the phase of the moon as well as display the date in a variety of calendrical systems.

Run it at your system startup or as a scheduled task. Pipe its output to your e-mail messages or /etc/motd.

Run a web site? Use CDAY to add value and attract visitors. This CDAY is CGI aware and generates HTML automatically when put in your /cgi-bin/. However, CDAY PHP is recommended for web servers.

The events are customizable. You may write your own event libraries or tap into CDAY's collection of 3000 + 5000 events.

TODAY has many incarnations: the original was written by Mike Butler in PL/1 on an IBM VM/CMS system. This, in turn, inspired Patrick Kincaid to write TODAY/PC in Datalight C in July of 1986. OS2DAY by Oleg Titov runs under OS/2. The program are using (CDAY C) was originally written from scratch about 1998.

License Agreement

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.



There are several major types of calendars:

Great Underground Empire

The Great Underground Empire calendar was used in Zork. Remember the game that came on 5 inch disks and featured Tandy support? The GUE calendar is derived from the Gregorian calendar.


The Gregorian calendar, a modification of the Julian calendar, is the most popular calendar in the world. It has been used for some 400-500 years and is a solar calendar.


Julian calendar begun its use in 45 BC and was named after Julius Caeser. Dionysus Exiguus later changed the epoch to the birth of Christ. Before then, it was common to count years according to the current king's name. Since years have been reckoned after the Great King. The Julian is a solar calendar.

Note: The Julian calendar and the Julian day numbers (JDNs) are not related.

Julian Day Numbers (JDNs)

Julian day numbers (JDNs) measure the number of days since January 1, 4713 BC. It is popular amoung astronomers and is a serial date system.

Hebrew (Jewish)

The Hebrew calendar is based on solar and lunar cycles.


There are several Mayan calendar systems: the ecumenical Tzolkin, the Haab, Calendar Round, and the Long Count.

Moon phase

The moon phase, or lunar phase, is the portion of the moon visible from Earth. Its cycle, about 29.5 days long, is the basis of other calendrical systems, including Gregorian months.


J.R.R. Tolkein wrote the Shire calendar in the popular book series The Lord of the Rings. It resembles the Gregorian calendar. Its most unique feature is six holidays that do not correspond to a month and day.

Compiling source code

If you use Windows or Linux, binaries may be available for your system. Compiling may not be necessary.

To compile, you will need a GCC compiler. Linux and similar operations systems often include GCC and MAKE. If you use Windows, install DJGPP.

To compile, download the source and unpack it. Then, run make as follows:

make clean


Windows 95 or greater

You will need a ZIP archive program, such WinZip, PKWARE's PKZIP, ICEOWS, or Infozip.

Running at Windows startup

Click open on the taskbar's START button. Open the PROGRAMS folder, then STARTUP. Click on CDAY.EXE using the right mouse button, dragging it to the STARTUP folder. Select COPY. CDAY will now load at Windows startup.

Shortcut on desktop

Click on CDAY.EXE using the right mouse button. Click on SEND TO, then select DESKTOP AS SHORTCUT.

Command Line Arguments

  Usage: CDAY [{-|+}c[x]] [-Fdd[mm[yyyy]]] [-i] [{-|+}l[x]]
      or CDAY 


      c: toggle display of calendars (all on by default)
     cf: toggle French Republican calendar
    cgr: toggle Gregorian calendar
    cgu: toggle Great Underground Empire calendar
    cjd: toggle JDNs
    cje: toggle Jewish calendar 
    cju: toggle Julian calendar
    cma: toggle Maya calendar
    cmo: toggle moon phase information
     cs: toggle Shire calendar 
      f: force date in the format dd[mm[yyyy]]
      i: display program information
      l: toggle library support (all on by default)
     lb: toggle birthdays
     le: toggle events
     lr: toggle reminders
    lib: specify library files


Run with all defaults and search current directory for library files.

CDAY -f09101981 

Use the date October 9, 1981.

CDAY -f0910 

Use the date October 9 of the current year.

CDAY -f09 

Use the date 9 of the current month.

CDAY c:\apps\cday\* 

Scan c:\apps\cday\* for the library files.

ex5: CDAY -cjul -cf
The Julian and French Republican calendars are disabled.

ex6: CDAY -l
No database libraries are scannde or displayed.


You can redirect, or pipe, CDAY's output to a file or device.

CDAY > c:\bbs\texts\today.txt 

(DOS or Windows)
Send data to the file c:\bbs\texts\today.txt. If it exists, is overwritten. If it doesn't, it is created.

CDAY >> /etc/mtod 

Append the file /etc/motd. If it doesn't exist, it is created.

cday | more 

Send output to the screen with pagination. When the screen is full, prompt for input. Use this to avoid missing information as it scrolls off the screen.

Web Server Use

Put CDAY in your web server's /cgi-bin/ directory, and it will automatically generate HTML. Put your libraries in the same directory or a directory called lib beneath it.

A user will access CDAY from your web site. It may be something like these: (Windows) (UNIX-like systems)

Consider using CDAY PHP, written by the same author, for web server use. It's more robust, quick, and secure. It's written specifically for web servers.


Libraries are the data files describing events such as birthdays, reminders, and general events. You may download some 8000 events, many of which were written by Patrick Kincaid.

The libraries are easy to modify or create. Write your own. All you need is a text editor. If you are using Microsoft Windows, try Wordpad. If you use a word processor, be sure to save as text.


Look for ready-to-use library files on the Internet:


CDAY looks for certain extensions for libraries. It will only scan files with these extensions. Name your libraries with one of these extensions:


The easiest way to learn the format is just to edit the existing libraries.

Generally one line is one event. The first column must be one of the following: B, S, or R.

Columns beginning B and S stand for birthdays and general events. For these types, the format is xMMDDYYYY where x is B or S, MM is month, DD is day of the month, and YYYY is the year. Note: MM and DD are always two characters and YYYY always four. The date code is followed by a space and then the event description.


S05252003 Today is May 25, 2003.
S01022003 Today is January 2, 2003.

For event type R, which is a reminder, the date format is RMMDDMMDD. The first MMDD pair is require. If a second pair is given, then the event describes a range.


R0525     May 25
R05250601 May 25 through June 1



Public domain code from

Portions copyright 1993-1995, Scott E. Lee, all rights reserved. Portions stardate.c copyright 1996, 1997 Andrew Main. Potrions (ord_text.c) copyright 1991 Robert B. Stout.

All other programs are copyright and/or trademarked by their respective author unless otherwise noted.