Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ calendar(1) — GL2 W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

at(1)

date(1)

mail(1)

CALENDAR(1)  —  Silicon Graphics

NAME

calendar − reminder service

SYNOPSIS

calendar [ − ]

DESCRIPTION

Calendar consults the file calendar in the current directory and prints out lines that contain today’s or tomorrow’s date anywhere in the line.  Most reasonable month-day dates such as “Dec. 7,” “december 7,” “12/7,” etc., are recognized, but not “7 December’ or “7/12”.  On weekends and holidays “tomorrow” extends through the next business day.  Entries preceded with an equals sign ( = ) will only match on the exact day, without advance “tomorrow”, weekend, or holiday notice. 

A ∗ may be used in the place of a month to mean every month.  The calendar file is first filtered through the “C” pre-processor so that #defines and #includes may be used. 

Calendar will match days of the week if they are preceded with an at-sign ( @ ).  The day should not be immediately followed with a slash except as discussed below.  The at-sign is necessary to avoid unintentionally matching a weekday given on a line where a month-day match is desired merely as an reminder of the day of the week that the event occurs on. 

One may specify every second, every third, or every fourth week for selecting a day of the week.  To do this, specify an at-sign, the name of the weekday, a slash ( / ), the modulus of the day of the year (January first being one) of any date which applies, and a second slash followed by the repetition factor.  For example, we get paid every second Friday with this Friday being a payday.  Today is Thursday and date +%j says today is the 236th day of the year.  Thus this Friday (tomorrow) is day 237.  Since 237 modulus 2 is 1 an appropriate entry would be

@Friday/1/2 Payday

When an argument is present, calendar does its job for every user who has a file calendar in their login directory and sends them any positive results by mail(1), using the first matching line to form a Subject line.  Normally this is done daily by facilities in the UNIX operating system under control of cron(1M).

EXAMPLES

If the user has the following lines, among other lines containing date information, in the file "calendar" in the login directory:

Monday, September 6Labor Day Holiday
Tuesday, Sep 7Back to work

typing in

calendar

either on the Friday before or on the specified Monday will cause these lines to be printed on the screen. 

The following might be typical of a calendar file:

#include private/birthdays
Monday, September 6 Labor Day Holiday
Tuesday, Sep 7 Back to work
January 1 New Year’s day
9/6 Labor Day Holiday
9-6 Take the day off
*/1 Mortgage payment due
07/04 Fourth of July
#define ECR in Engineering Conference Room
#define MCR in Main Conference Room
@Thursday SCR meeting 10:30 ECR
@Wed Meeting on reducing meetings 2pm MCR
@Monday and @Wednesday: Scuba Class at 7pm

FILES

calendaryour calendar of events
/usr/lib/calprogto figure out today’s and tomorrow’s dates
/etc/passwdlogin directories
/usr/lib/acct/holidaystable of holidays
/tmp/cal∗temporary files
/usr/lib/crontabinvoke calendar daily

SEE ALSO

at(1), date(1), mail(1). 

Version 2.3  —  July 04, 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026