DATEBOOK(4)
NAME
datebook − event file format
DESCRIPTION
The datebook program uses an ascii file format to describe events. The specification is human readable and easy to use.
The general format looks like:
[==defaultclass]
message [=class]
datespec [time]
<empty line>
.
.
.
Grammar in Backus-Naur Form
All literals in the following specification are case-insensitive.
<event> ::= <message> [ <class> ]
[ <datespec> [ <timerange> ] ]
<datespec> ::= <daterange>
| <datespec> except <daterange>
| <datespec> after <daterange>
| <datespec> <before> <daterange>
| <datespec> <or> <daterange>
| <datespec> between <date> <or> <date>
<daterange> ::= <day>
| <date>
| <date> <thru> <date>
| <day <thru> <day>
| <relative> <day> [ <nthopts> ]
<date> ::= <month> <dateval> [ [,] <yearval> ]
| <dateval> <month> [ [,] <yearval> ]
| <monthval> / <dateval> [ / <yearval> ]
| today | tomorrow
<relative> ::= <number> <nth>
| last
<nthopts> ::= in <month> [ [,] <yearval> ]
| in <monthval> / <yearval>
<month> ::= january | jan
| february | feb
| march | mar
| april | apr
| may
| june | jun
| july | jul
| august | aug
| september | sep | sept
| october | oct
| november | nov
| december | dec
| everymonth
<day> ::= sunday | sun
| monday | mon
| tuesday | tue
| wednesday | wed
| thursday | thu | thur
| friday | fri
| saturday | sat
| day | everyday | weekday
<timerange> ::= <time>
| <time> <thru> <time>
<time> ::= <hourval> [ : <minuteval> ] [ <ampm> ]
<or> ::= or | and
<before> ::= before | until
<thru> ::= through | thru | to | -
<nth> ::= st | nd | rd | th
<in> ::= in | of
<ampm> ::= am | a.m.
| pm | p.m.
The message is any string or characters enclosed in matching characters from the set: ” "" () {} []
The year is of the form 1989 or 89.
The class is an alphanumeric string immediately preceeded by an "=", and is case-insensitive.
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 uses the default class. The first event has the class birthday. The fourth event has the class doctor. The last event has the class offsite.
— June 06, 1991