2015-03-08 20:28:32 +00:00
|
|
|
.Dd March 8, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt CAL 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-16 20:50:34 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm cal
|
|
|
|
.Nd show calendar
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 20:17:58 +00:00
|
|
|
.Nm
|
2015-03-08 20:28:32 +00:00
|
|
|
.Op Fl 1 | Fl 3 | Fl y | Fl n Ar num
|
|
|
|
.Op Fl s | Fl m | Fl f Ar num
|
|
|
|
.Op Fl c Ar num
|
2015-01-16 21:46:37 +00:00
|
|
|
.Oo Oo Ar month Oc Ar year Oc
|
2015-01-16 20:50:34 +00:00
|
|
|
.Sh DESCRIPTION
|
2015-03-08 20:28:32 +00:00
|
|
|
.Nm
|
|
|
|
writes a calendar of
|
2015-01-16 20:50:34 +00:00
|
|
|
.Ar month
|
2013-06-19 18:13:50 +00:00
|
|
|
and
|
2015-03-08 20:28:32 +00:00
|
|
|
.Ar year
|
|
|
|
or the current month to stdout.
|
2015-01-08 19:21:37 +00:00
|
|
|
If
|
2015-01-16 20:50:34 +00:00
|
|
|
.Ar year
|
2015-01-08 19:21:37 +00:00
|
|
|
is given without
|
2015-01-16 20:50:34 +00:00
|
|
|
.Ar month ,
|
2015-03-08 20:28:32 +00:00
|
|
|
.Nm
|
|
|
|
writes a 3-column calendar of the whole
|
|
|
|
year to stdout.
|
|
|
|
The date formatting is according to
|
|
|
|
.Xr localtime 3 .
|
2015-01-16 20:50:34 +00:00
|
|
|
.Pp
|
|
|
|
The Julian calendar is used until Sep 2, 1752. The Gregorian calendar is used
|
|
|
|
starting the next day on Sep 14, 1752.
|
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
2015-01-18 00:40:37 +00:00
|
|
|
.It Fl 1
|
2015-03-08 20:28:32 +00:00
|
|
|
Print current month. This is the default.
|
2015-01-18 00:40:37 +00:00
|
|
|
.It Fl 3
|
2015-03-08 20:28:32 +00:00
|
|
|
Print previous, current and next month.
|
|
|
|
.It Fl c Ar num
|
|
|
|
Print
|
|
|
|
.Ar num
|
|
|
|
calendars in a row. The default is 3.
|
|
|
|
.It Fl f Ar num
|
|
|
|
Set
|
|
|
|
.Ar num
|
2015-02-01 19:52:28 +00:00
|
|
|
(0 is Sunday, 6 is Saturday) as first day of week.
|
|
|
|
.It Fl m
|
2015-03-08 20:28:32 +00:00
|
|
|
Set Monday as first day of week.
|
|
|
|
.It Fl n Ar num
|
|
|
|
Output
|
|
|
|
.Ar num
|
|
|
|
months starting from and including the current month.
|
2015-02-01 19:52:28 +00:00
|
|
|
.It Fl s
|
2015-03-08 20:28:32 +00:00
|
|
|
Set Sunday as first day of week.
|
|
|
|
.It Fl y
|
|
|
|
Print the entire
|
|
|
|
.Ar year
|
|
|
|
or current year.
|
2015-01-16 20:50:34 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr localtime 3
|
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
|
|
|
.St -p1003.1-2008
|
|
|
|
specification.
|
|
|
|
.Pp
|
|
|
|
The flags
|
2015-03-08 20:28:32 +00:00
|
|
|
.Op Fl 13cfmnsy
|
2015-01-16 20:50:34 +00:00
|
|
|
are an extension to that specification.
|