From owner-freebsd-hackers Mon Jul 28 19:11:21 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA24753 for hackers-outgoing; Mon, 28 Jul 1997 19:11:21 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA24704 for ; Mon, 28 Jul 1997 19:10:44 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id LAA09434; Tue, 29 Jul 1997 11:40:27 +0930 (CST) From: Michael Smith Message-Id: <199707290210.LAA09434@genesis.atrad.adelaide.edu.au> Subject: Re: date(1) In-Reply-To: <199707281949.UAA21778@awfulhak.org> from Brian Somers at "Jul 28, 97 08:49:28 pm" To: brian@awfulhak.org (Brian Somers) Date: Tue, 29 Jul 1997 11:40:27 +0930 (CST) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Brian Somers stands accused of saying: > > I'd like to add the following functionality to date(1) in -current, > and eventually backport it to RELENG_2_2. The argument against is > that it introduces more cruft into /bin, but I think date(1) is the > correct place for it. > > The following flags will "adjust" the displayed date: > > -D [+|-]days > -M [+|-]months > -W [+|-]weekdays > -Y [+|-]years > > Without the + or - before the given day/month/weekday/year, the > appropriate bit of the date will be set to the given value. With > the + or -, the date will be adjusted by the given value. > > For example, ``date -D1'' will output the date on the first of this > month, ``date -D1 -D-1'' will output the last day of last month, > ``date -D1 -D-1 -W+saturday'' will output the date on the first > Saturday of this month and ``date -D1 -M+1 -W-fri'' will output > the last Friday of the month. > > The flags are processed strictly in order. > > The functionality can be used to provide arguments to programs and > would be *really* useful for archiving scripts. > > Any objections or suggestions ? Please also add : - The ability to parse timestamps in ctime()-like format. - The ability to input and output the timestamp in decimal or hex localtime() format, ie. 0xXXXXXXXX or DDDDDDDDDD > Brian , -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[