date(1) documentation
Rick Richardson
rick at pcrat.uucp
Thu Aug 23 01:53:43 AEST 1990
The date(1) documentation in the SVR3.2 manuals (and the SVID Issue 2)
lists a subset of the cftime(3) format specifiers as legal for printing
dates. However, it appears that all of the cftime(3) format specifiers
work in the implementations I've tried.
The date(1) documentation should be changed to indicate that the
legal specifiers are the same as described in cftime(3). Many
of these specifiers are truly useful in shell scripts, so I'd
hate for them to "go away" just because the SVID omitted them.
Actually, it would be superb if the date(1) command were
extended to allow both a time specification and a format
specification, so that a shell script could print a
date in the future (or past) using the format specifiers. E.G.
$ date 0101000090 +%w
1
$
And to allow date arithmetic, e.g. if today is 01/01/90:
$ date NOW-0001000000 +%m/%d/%y
12/31/89
$
or relative to a past or future date:
$ date 0301000092-0001000000 +%m/%d/%y
02/29/92
$ date 0228000091+0001000000 +%m/%d/%y
03/01/91
$ date 0228000092+0001000000 +%m/%d/%y
02/29/92
$
-Rick
--
Rick Richardson | Looking for FAX software for UNIX/386 ??? Ask About: |Mention
PC Research,Inc.| FaxiX - UNIX Facsimile System (tm) |FAX# for
uunet!pcrat!rick| FaxJet - HP LJ PCL to FAX (Send WP,Word,Pagemaker...)|Sample
(201) 389-8963 | JetRoff - troff postprocessor for HP LaserJet and FAX|Output
More information about the Comp.bugs.sys5
mailing list