Add mandoc-manpage for cal(1)

Grouping semi-exclusive flags makes it easier to understand what
you can do.
This commit is contained in:
FRIGN 2015-01-16 21:50:34 +01:00 committed by sin
parent efac15726b
commit bdca40494a

124
cal.1
View File

@ -1,68 +1,58 @@
.TH CAL 1 sbase\-VERSION .Dd January 16, 2015
.SH NAME .Dt CAL 1 sbase\-VERSION
cal \- print calendar .Sh NAME
.SH SYNOPSIS .Nm cal
.B cal .Nd show calendar
.RB [ \-1 ] .Sh SYNOPSIS
.RB [ \-3 ] .Nm cal
.RB [ \-m ] .Op Fl 1 | Fl 3 | Fl y | Fl n Ar nmonths
.RB [ \-s ] .Op Fl s | Fl m | Fl f Ar firstday
.RB [ \-y ] .Op Fl c Ar columns
.RB [ \-c .Oo Oo Oo Ar day Oc Ar month Oc Ar year Oc
.IR columns ] .Sh DESCRIPTION
.RB [ \-f
.IR firstday ]
.RB [ \-n
.IR nmonths ]
.RB [ [
.IR month ]
.IR year ]
.SH DESCRIPTION
Beginning with
.IR month
and
.IR year
print
.IR number
of calendars side by side. Each row of calendars contains at most
.IR columns
number of calendars. The defaults are obtained using
.IR localtime (3).
If
.IR year
is given without
.IR month
print the whole year, unless overridden by options. The Julian calendar is used
through Sep 2, 1752, and the Gregorian calendar is used starting the next day
with Sep 14, 1752.
.SH OPTIONS
.TP
.B \-1
Print one single month.
.TP
.B \-3
Print prev/current/nexth month.
.TP
.B \-m
Print Monday as first day of week.
.TP
.B \-s
Print Sunday as first day of week.
.TP
.B \-y
Print a calendar of the current year.
.TP
.BI \-c " columns"
Print Print
.IR columns .Ar nmonths
number of calendars in a row. The default is 3. calendars side by side beginning with
.TP .Ar month
.BI \-f " firstday" and
Specify the first day of the week. 0 is Sunday and 6 is Saturday. .Ar year .
.TP Each row of calendars contains at most
.BI \-n " nmonths" .Ar columns
Specify the number months to print. The default is 1. calendars. The date formatting is obtained using
.SH SEE ALSO .Xr localtime 3 .
.IR localtime (3) .Pp
.SH STANDARDS If
This program tries to conform to IEEE Std 1003.1, 2013 Edition, q.v. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cal.html. .Ar year
is given without
.Ar month ,
print the whole year, unless overridden by other options.
.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
.It Fl 1 | Fl 3 | Fl n Ar nmonths | Fl y
Show current month | previous, current and next month |
.Ar nmonths
months | year.
.It Fl s | Fl m | Fl f Ar firstday
Set Sunday | Monday |
.Ar firstday
(0 is Sunday, 6 is Saturday) as first day of week.
.It Fl c Ar columns
Set number of calendars in a row. The default is 3.
.El
.Sh SEE ALSO
.Xr localtime 3
.Sh STANDARDS
The
.Nm
utility is compliant with the
.St -p1003.1-2008
specification.
.Pp
The flags
.Op Fl 13ynsmfc
and
.Op Ar day
are an extension to that specification.