Consider a simple diary/calendar application specified as follows. A diary is a sequence of events. Each event has a date and a description, and has either both a time and a duration or neither. An event can be repeated weekly, monthly or yearly, and this repetition can continue indefinitely, until a specified date or a fixed number of times (weeks, months or years, respectively). The default repetition for an event is weekly, continuing indefinitely.