A calendar of University of Kent week numbers

I live by my organisers, e.g. the calendar on my desktop, iCal, and that on my PDA (e.g. iPhone and before that Palm) rather than the Kent paper diary. The diary has (at least) one advantage however: it specifies the week numbers. I have long found it a pain to enter all of these by hand into my organiser. So I've written a little Perl script to generate a set of regularly spaced dates (e.g. the week number on the Monday of every week) into a format that can then be imported into a calendar. It supports two formats: vCal (.vcs,.ics) which is widely used, and a legacy (?) format that can be converted into datebook .dba (which I needed when I used the Palm Desktop on Windows).

Here's the weeks for this academic year in vCal/ics format, ready to be imported into your calendar. Each week is represented by an all-day event on Monday.


DIY

To do this yourself, you'll need (1) Perl. If you use a Mac, Google calendar or (I think) most modern Windows calendars, that's it.

However, Windows users with Palm organisers (does anyone still use these?) will need (2) a little DOS tool called convdb. I got a copy from here. It's a pretty flexible if rather fragile tool for converting from plain text to the Palm .dba format. As an example, here's the terms 2006/07 in datebook .dba format.

Usage

events.pl [-h] [-v|d] [-l label] [-p period] [-s start] day/month/year repeat...
events.pl expects groups of pairs of arguments. It will generate a list of dates for each group, starting with the date given and repeated repeat times, using a period of period days.

Options:

-h Print this message and exit.
-v Use vcal format (default).
-d Use dba format.
-l label Print each event as "label N" where N is the number of the event. Default: "Kent Week".
-p period The repeat period in days. Default: 7.
-s start The starting number for the label. Default: 1.

Example

First, generate the dates in vcal format. E.g.

events.pl 24/9/2007 12 14/1/2008 12 5/5/2008 6 > ukc0708.ics

will produce a list in plain text for the the three terms of Kent 2007/8 academic year.

Then, import it to your calendar.

Technical Note: There's little difference between .vcs and .ics files, at least as far as generating week dates is concerned. The .ics format should specify VERSION:2.0 whereas .vcs should specify VERSION:1.0. My code generates VERSION:2.0. However, I find that importing a file with an .ics extension into Mac OS Calendar "works", i.e. events appear in the all-day section of the calendar, whereas importing a file with an .vcs extension does not, regardless of the VERSION: the event appears as literally all day.

Windows for Palm example

First, generate a plain text list of dates in a format convdb can read. E.g.

events.pl 24/9/2007 12 14/1/2008 12 5/5/2008 6 > ukc0708.txt

will produce a list in plain text for the the three terms of Kent 2007/8 academic year.

You then need to convert it to .dba format with convdb; the .dba file will be called output.dba.

Finally, rename output.dba to something sensible, e.g. ukc0708.dba and import it to your organiser (e.g. via the Palm desktop).

TODO

It would be nice if convdb was translated to something portable, e.g. Perl.

Richard Jones

Original: August 2007.
Modified: September 2008.
Modified: September 2009.
Modified: October 2014 - Use all-day events; default .ics format.