Commit Graph

28 Commits

Author SHA1 Message Date
Eugene Yunak d106c83b19 cal: `color` option documentation should match actual behaviour 2014-09-21 15:51:57 +03:00
Karel Zak 60ec67ff4e lib/colors: add info to man pages, add terminal-colors.d.5
Co-Author: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-11 10:05:32 +01:00
Benno Schulenberg cad44d02bd cal: in man page improve grammar and wording of the reformation limitation
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-01-07 09:44:01 +01:00
Benno Schulenberg 2d4f3bfb7f cal: in man page admit that any week has just one Sunday
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06 12:42:05 +01:00
Sami Kerola bc36e66a84 cal: mention where Gregorian reformation happen in September 1752
In September 1752 the Gregorian reformation happen in Great Britain and
Dominions (including what is now the USA).  One could argue the cal(1)
should consider locale when determining the reformation, but such is
nearly impossible implement correctly.

The dates when reformation happen are split by areas that cannot be
expressed with current locales, for example the Netherlands is split to
two and Germany three categories depending on where in the modern country
one is.  Secondly the track when reformation happen is lost for some
countries, Lithuania or Japan are good examples of such.

One of the worst for a programmer is Sweden.  They got gradual calendar
change which made Swedish calendar to be completely out of sync.  Later
the Swedish calendar jumped in 1753 to be in sync with everyone else.

Notice that some countries, including Saudi Arabia, Ethiopia, Nepal, Iran
and Afghanistan, still have not adopted the Gregorian calendar.  Hence
the output of the cal(1) cannot be considered to be correct for everyone.

References: http://calendopedia.com/gregory.htm
References: http://en.wikipedia.org/wiki/Gregorian_calendar#Gregorian_reform
Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-01-06 12:41:51 +01:00
Tommi Kyntola af7c483e62 cal: remove optional from short arg -w
The long option --week still has the optional argument as --week=<wnum>

This was suggested on the mailing list by Padraig Brady and I do agree with that.
Actually, the whole idea of --week=<wnum> came from him.

Signed-off-by: Tommi Kyntola <kynde@iki.fi>
2013-10-22 10:39:08 +02:00
Tommi Kyntola aae4f87e68 cal: added argument option for -w|--week to display that week
Because many years have two sections of week 52 or 53, the week that
this argument points to is the one that starts during that year (when available).
The week number in argument is also highlighted in addition to possibly visible
current/defined date highlighting.

Signed-off-by: Tommi Kyntola <kynde@iki.fi>
2013-10-22 10:32:32 +02:00
Tommi Kyntola c36c4a4e4d cal: added -w|--week for showing week numbers
Added week numbers both in ISO-6801 and North America numbering.
The mode is determined by first day of the week, Monday
for ISO and Sunday for North America mode.

ISO week numbers are defined as the first Thursday being part of week 1.
The North America numbering is defined, at least by gcal, as first Sunday
being in the first week.

Signed-off-by: Tommi Kyntola <kynde@iki.fi>
2013-10-22 10:27:03 +02:00
Benno Schulenberg b4362b6f84 docs: standardize the phrases for --help and --version in all man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:30 +02:00
Pádraig Brady 233ad1fa9b cal: improve the help text and man page
* misc-utils/cal.c: Add a little doc string, and mention that the
  current month is implicit if not specified.  Also remove mention
  of "current" from two option descriptions as a specific date may
  have been specified.
* misc-utils/cal.1: Likewise.

[kzak@redhat.com: - use fputs and USAGE_SEPARATOR]

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-11 10:44:21 +02:00
Sami Kerola 3fe71c46c3 docs: cal: stop telling year 9999 is upper limit
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-05-26 20:49:47 +01:00
Sami Kerola e47346ff19 docs: cal: add --color option description to manual page
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-05-26 09:59:19 +01:00
Benno Schulenberg 232dc924c4 docs: uniformize the header and footer lines in man pages
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.

Also improve here and there the one-line program description.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-22 10:39:21 +02:00
Petr Uzel b881ebc69a cal: fix manpage formatting
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-08-08 11:49:38 +02:00
Sami Kerola 4b5a1ab8e4 docs: inform about cal long options
The parameters section is now split per a parameter, which I
found more readable than the previous layout. In addition the
nroff syntax is changed to be closer what help2man is suggesting
it should be.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-25 13:45:26 +02:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Karel Zak d1f5a55949 cal: remove unnecessary info from man page
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=604238
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-16 09:16:00 +02:00
Peter Breitenlohner eb3395852b cal.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:07 +02:00
Pádraig Brady 0a9bead039 cal: determine the first day of week from the locale
Previously it defaulted to Sunday rather than using
the value from the locale. Lauri Nurmi <lanurmi@iki.fi>
provided the detailed argument for this change while
Samuel Thibault <samuel.thibault@ens-lyon.org> provided
the information on how to read the first day of the week
from the locale correctly.

[kzak@redhat.com: - fix "cast from pointer to integer",
                    nl_langinfo(_NL_TIME_WEEK_1STDAY) call)]

Signed-off-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-10 13:01:39 +01:00
Pádraig Brady d7a92b8994 cal: add support for highlighting an arbitrary date
This is done by calling cal with the extra day parameter like:

cal 14 9 1752

Note the tests were updated to use the new syntax.

Note also that this patch changes the -y option
to always print a full year, even if a month or
the -[13] options are specified.
This matches the cal operation from bsdmainutils on debian
and also allows one to print a full year while
highlighting a particular date.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
2007-10-11 14:19:39 +02:00
Li Zefan 14b22761a0 cal: add description about option -V to manpage
cal support option -V to display version information, but the manpage doesn't
mention it.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2007-09-05 11:49:05 +02:00
Karel Zak 86d62711a9 man pages: add "AVAILABILITY" section
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:17:04 +02:00
Karel Zak ffc4374869 Imported from util-linux-2.11o tarball. 2006-12-07 00:25:53 +01:00
Karel Zak 364cda4857 Imported from util-linux-2.11f tarball. 2006-12-07 00:25:48 +01:00
Karel Zak 66ee8158b6 Imported from util-linux-2.10s tarball. 2006-12-07 00:25:44 +01:00
Karel Zak eb63b9b8f4 Imported from util-linux-2.10f tarball. 2006-12-07 00:25:41 +01:00
Karel Zak 5c36a0eb7c Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
Karel Zak 6dbe3af945 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00