on March 31 won't take you to March 2 or 3 (now the result will
be the last day of February.)
In general, now stepping by months from the last days of the current
month A will take you to the very last day of the target month B if
B is shorter than A.
The previous version would just step to March 31 and rely on mktime(3)
to correct the date. Despite its simplicity, such way was counter-intuitive
to users and caused pain to shell script writers.
Noticed by: Igor Timkin <ivt at gamma dot ru>
Approved by: brian
MFC after: 2 weeks
back into epoch time. Everytime I'm asked to do this by someone I
have to spend about ten minutes recreating the same command line.
So record it under examples.
decoration. Further improvements are welcome, but at least this
is a separate of the various modes of operation date has, as well as
sectioning off the two deprecated options for settimeofday(tz) that
don't even apply to actual operation of date as such, anyway.
in the comment applies to a decision that needs to be made in relation
to the year 2000.
In fact, that statement probably should be changed to be
more generic (getting the year from the current time perhaps). Otherwise,
starting in 2069 two digit year conversions in date(1) will start assuming
1900 instead of 2000. hehe.
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
Approved by: arch@, new style(9)
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
in committers (Message-Id: <72836.964344168@axl.ops.uunet.co.za>).
Also cleaned up a .Pq macro which was causing problems previous
to the original update I made.
Reviewed by: sheldonh
Approved by: jkh
option already supported octal. Add a comment to the -r option
in the man page so it's a bit more specific.
Discrepancy brought to my attention by: sasdrq@unx.sas.com
Approved by: jkh