From owner-freebsd-hackers Mon Jul 28 14:02:13 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA02579 for hackers-outgoing; Mon, 28 Jul 1997 14:02:13 -0700 (PDT) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA02267 for ; Mon, 28 Jul 1997 13:56:58 -0700 (PDT) Received: from awfulhak.org (dev.lan.awfulhak.org [10.0.1.5]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id UAA17193 for ; Mon, 28 Jul 1997 20:49:28 +0100 (BST) Received: from dev.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.org (8.8.6/8.8.6) with ESMTP id UAA21778 for ; Mon, 28 Jul 1997 20:49:28 +0100 (BST) Message-Id: <199707281949.UAA21778@awfulhak.org> X-Mailer: exmh version 2.0delta 6/3/97 To: freebsd-hackers@FreeBSD.org Subject: date(1) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 28 Jul 1997 20:49:28 +0100 From: Brian Somers Sender: owner-freebsd-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Hi, 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 ? -- Brian , Don't _EVER_ lose your sense of humour....