From owner-freebsd-current@FreeBSD.ORG Wed Sep 8 11:45:11 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B6A416A4CE for ; Wed, 8 Sep 2004 11:45:11 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CE3E43D2D for ; Wed, 8 Sep 2004 11:45:10 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id D8D6A1FF92F; Wed, 8 Sep 2004 13:45:07 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id E7DB71FF91D; Wed, 8 Sep 2004 13:45:05 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 129FC1567C; Wed, 8 Sep 2004 11:44:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 07F8515384; Wed, 8 Sep 2004 11:44:45 +0000 (UTC) Date: Wed, 8 Sep 2004 11:44:44 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Poul-Henning Kamp In-Reply-To: <38933.1094640660@critter.freebsd.dk> Message-ID: References: <38933.1094640660@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: FreeBSD current mailing list Subject: Re: Idea for date(1) improvement. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 11:45:11 -0000 On Wed, 8 Sep 2004, Poul-Henning Kamp wrote: > I have sometimes needed to get the date of yesterday or last monday > and so on for creating filenames. > > We have this very flexible code in at(1) and cvs(1) for specifying > time. > > Anyone up for making it possible to say: > > date -w "2 days ago" > > ? -w ? isn't it -v ? date -v-2d ? Anyway I do not like both of this ... I think I haven't used -v since that one day in 2000.... : THE PROBLEM: : --------------- : : for this night : : : > date : Sat Apr 1 00:26:11 CEST 2000 : > date -v-1d +%Y%m : 200002 : > date -v-1d +%Y%m%d : 20000229 : > date : Sat Apr 1 00:26:21 CEST 2000 -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT