Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Sep 2004 11:44:44 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        FreeBSD current mailing list <current@freebsd.org>
Subject:   Re: Idea for date(1) improvement.
Message-ID:  <Pine.BSF.4.53.0409081106290.51837@e0-0.zab2.int.zabbadoz.net>
In-Reply-To: <38933.1094640660@critter.freebsd.dk>
References:  <38933.1094640660@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.53.0409081106290.51837>