Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Sep 2004 15:12:54 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        current@FreeBSD.org
Subject:   Re: Idea for date(1) improvement.
Message-ID:  <20040908121254.GC86996@ip.net.ua>
In-Reply-To: <Pine.BSF.4.53.0409081106290.51837@e0-0.zab2.int.zabbadoz.net>
References:  <38933.1094640660@critter.freebsd.dk> <Pine.BSF.4.53.0409081106290.51837@e0-0.zab2.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--s/l3CgOIzMHHjg/5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 08, 2004 at 11:44:44AM +0000, Bjoern A. Zeeb wrote:
> On Wed, 8 Sep 2004, Poul-Henning Kamp wrote:
>=20
> > 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"
> >
> > ?
>=20
> -w ? isn't it -v ?  date -v-2d ?
>=20
> Anyway I do not like both of this ... I think I haven't used -v
> since that one day in 2000....
>=20
> : 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
>=20
This one has been long fixed, in date/vary.c,v 1.9 (2000/04/05):

: $ env LC_ALL=3DC TZ=3DEurope/Prague ./date -v-1d -j 200004010000
: Tue Feb 29 23:00:00 CET 2000
: $ cvs -R up -r1.9 vary.c
: U vary.c
: $ make date
: cc -O -pipe     -c vary.c
: cc -O -pipe      -o date date.o netdate.o vary.o -lutil
: $ env LC_ALL=3DC TZ=3DEurope/Prague ./date -v-1d -j 200004010000
: Fri Mar 31 00:00:00 CEST 2000

Recently, more changes to the -v behavior have been made by yar@.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--s/l3CgOIzMHHjg/5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBPvdGqRfpzJluFF4RAgXfAKCOLoVVNYep7tbCPXMb16cjT5KxjACeLgpE
+XwH4TnI3+VlEHCedsrnKt8=
=GUDg
-----END PGP SIGNATURE-----

--s/l3CgOIzMHHjg/5--



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