diff options
author | Karel Zak | 2016-05-31 18:27:20 +0200 |
---|---|---|
committer | Karel Zak | 2016-05-31 18:27:20 +0200 |
commit | cd28d6a405c9cfcaf30fe248a4df84133dbfa17a (patch) | |
tree | 09aee2fba8104cc24a521a0769f70f93bc6f8772 /misc-utils/cal.1 | |
parent | cal: allow to specify month by name (diff) | |
download | kernel-qcow2-util-linux-cd28d6a405c9cfcaf30fe248a4df84133dbfa17a.tar.gz kernel-qcow2-util-linux-cd28d6a405c9cfcaf30fe248a4df84133dbfa17a.tar.xz kernel-qcow2-util-linux-cd28d6a405c9cfcaf30fe248a4df84133dbfa17a.zip |
cal: support timestamps
For example
$ cal '2 weeks ago'
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/cal.1')
-rw-r--r-- | misc-utils/cal.1 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/misc-utils/cal.1 b/misc-utils/cal.1 index 683e67d19..11e97462c 100644 --- a/misc-utils/cal.1 +++ b/misc-utils/cal.1 @@ -41,6 +41,10 @@ cal \- display a calendar .B cal [options] .RI [[[ day ] " month" ] " year" ] +.br +.B cal +[options] +.RI <timestamp> .SH DESCRIPTION .B cal displays a simple calendar. If no arguments are specified, the current @@ -48,6 +52,19 @@ month is displayed. .sp The \fImonth\fR may be specified as a number (1-12) or as a month name according to the current locales. +.sp +.B cal +accepts special placeholders when parsing \fItimestamp\fR, "now" may be used to +refer to the current time, "today", "yesterday", "tomorrow" refer to +of the current day, the day before or the next day, respectively. +.sp +The relative date specifications are also accepted, in this case "+" is +evaluated to the current time plus the specified time span. Correspondingly, a +time span that is prefixed with "-" is evaluated to the current time minus the +specified time span, for example '+2days'. Instead of prefixing the time span +with "+" or "-", it may also be suffixed with a space and the word "left" or +"ago" (for example '1 week ago'). + .SH OPTIONS .TP \fB\-1\fR, \fB\-\-one\fR |