名字
cal - 显示一个日历
总览
cal [-mjy ] [月份 [年份 ] ]
描述
Cal 显示一个简单的日历.. 如果没有指定参数, 则显示当前月份. 选项如下所列:
- -m
- 显示星期一作为一周的***天.. (缺省为星期日.)
- -j
- 显示儒略历的(Julian)日期 (以 1 为基的天数, 从 1 月 1 日开始计数) .
- -y
- 显示当前年份的日历..
一个单一的参数指定要显示的年份 (1 - 9999) ; 注意年份必须被完全地指定: ``cal 89 '' 不会 显示1989年的日历. 两个参数表示月份 (1 - 12) 和年份. 如果没有指定参数, 则显示当前月份的日历.
一年从Jan 1 (1 月 1 日) 开始.
格里高利历法改革(Gregorian Reformation)被认为发生于 1752 年 9 月 3 日. 在此之前, 多数国家已经认可这项改革(尽管有一些直到 20 世纪初才认可它). 那天之后的 10 天在这项改革被略去了, 所以那个月的日历有点不太寻常.
历史
一个 命令出现于第6版 AT&T UNIX.
#p#
NAME
cal - displays a calendar
SYNOPSIS
cal [-smjy13 ] [[ month ] year ]
DESCRIPTION
Cal displays a simple calendar. If arguments are not specified, the current month is displayed. The options are as follows:
- -1
- Display single month output. (This is the default.)
- -3
- Display prev/current/next month output.
- -s
- Display Sunday as the first day of the week. (This is the default.)
- -m
- Display Monday as the first day of the week.
- -j
- Display Julian dates (days one-based, numbered from January 1).
- -y
- Display a calendar for the current year.
A single parameter specifies the year (1 - 9999) to be displayed; note the year must be fully specified: ``cal 89 '' will not display a calendar for 1989. Two parameters denote the month (1 - 12) and year. If no parameters are specified, the current month's calendar is displayed.
A year starts on Jan 1.
The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd of September. By this time, most countries had recognized the reformation (although a few did not recognize it until the early 1900's.) Ten days following that date were eliminated by the reformation, so the calendar for that month is a bit unusual.
HISTORY
A cal command appeared in Version 6 AT&T UNIX.