Also tweak some other wordings and formatting.
Reported-by: Felix Neumann <felix.neumann@inka.de>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
[kzak@redhat.com: - add month_in_row to avoid extra meaning of num_month=-3,
- add header_year
- add long option for -Y
- define conflicts between -Y, -y and -n
- remove ctl.yflag]
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
As per the convention shown in Documentation/howto-man-page.txt.
Also make a few other tiny adjustments along the way.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>