🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #224

date(1) documentation

#224
From: Rick Richardson
Date: Wed, 22 Aug 1990 15:53
43 lines
1803 bytes
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
Technical Details
Message-ID: <1990Aug22.155343.4058@pcrat.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!pcrat!rick

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!pcrat!rick
From: rick@pcrat.uucp (Rick Richardson)
Newsgroups: comp.bugs.sys5,comp.unix.i386
Subject: date(1) documentation
Message-ID: <1990Aug22.155343.4058@pcrat.uucp>
Date: 22 Aug 90 15:53:43 GMT
Organization: PC Research, Inc.
Lines: 43