DATEBOOK(5) BSD DATEBOOK(5)
NAME
datebook - event file format
DESCRIPTION
The datebook program uses an ASCII file format to describe events. The
specification is meant to be human readable and easy to use although it
sometimes falls short of this.
The general format looks like:
[==defaultclass]
message [=class]
datespec
[time]
<empty line>
.
.
.
Grammar in Yacc format
event : Message class datespec
| Message class datespec timerange
;
class :
| Class
;
datespec: daterange
| datespec Except daterange
| datespec And daterange
| datespec Or daterange
| datespec Between date Or date
;
daterange: dayordate
| dayordate Before date
| dayordate After date
| date Thru date
| day Thru day
;
dayordate: date
| day
;
date : Month Integer ',' Year
| Integer Month ',' Year
| Month Integer Year
| Integer Month Year
| Integer '/' Integer '/' Year
| Integer '/' Integer
| Month Integer
| Integer Month
| 'today'
| 'tomorrow'
| Integer Nth DAY nthopts
| Integer Nth 'weekday' nthopts
;
day : DAY
| 'weekday'
;
nthopts :
| IN Month
;
timerange: time
| time Thru time
;
time : Integer ':' Integer
| Integer ':' Integer AM
| Integer ':' Integer PM
| Integer AM
| Integer PM
;
Message The message is any string or characters enclosed in matching
characters from the set: '' "" () {} []
All of the following are not case sensitive.
Month and Day
These can be the entire name or the first three letters: Jan,
January, jan, Fri, Friday, friday.
Year Of the form 1989 or 89.
Nth From the sequence 1st, 2nd, 3rd, 4th, 5th.
Am and Pm
These can be am a.m. pm p.m.
In Can be in or of
Before Can be before or until
Thru Can be thru, to, or "-"
Or Can be or or and. This is confusing but seems to match the
English usage.
And Is &&.
Class Is an alphanumeric string immediately preceeded by an "=".
EXAMPLE DATE FILE
A sample event file might look like this:
==meeting
{Joan's Birthday}=birthday
October 10
'Project Meeting in the Sea Breeze room'
Monday 2:00 PM
"monthly report due"
1st weekday
"staff meeting"
Tuesday except April 25
1:00 PM
"Section meeting
10-11 in the Auditorium"
March 18,1988
10 am
(Doctor's appointment)=doctor
2nd Tuesday 3:30 PM
[SEPC]=offsite
Aug 1 - Aug 5 8:30
The line ==meeting specifies that the default class for all events in
this file is meeting. All but three of the events will use the default
class. The first event will have the class birthday. The fourth event
will have the class doctor. The last event will have the class offsite.