From owner-freebsd-current Mon Jan 3 18:16:40 2000 Delivered-To: freebsd-current@freebsd.org Received: from awfulhak.org (dynamic-8.max4-du-ws.dialnetwork.pavilion.co.uk [212.74.9.136]) by hub.freebsd.org (Postfix) with ESMTP id BA86E1504F for ; Mon, 3 Jan 2000 18:16:24 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id BAA86318; Tue, 4 Jan 2000 01:46:48 GMT (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id BAA03280; Tue, 4 Jan 2000 01:50:12 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200001040150.BAA03280@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.0 09/18/1999 To: Alexander Langer Cc: current@FreeBSD.ORG, brian@hak.lan.Awfulhak.org Subject: Re: date(1) and -v-1m In-Reply-To: Message from Alexander Langer of "Fri, 31 Dec 1999 15:08:29 +0100." <19991231150829.A28634@cichlids.cichlids.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Jan 2000 01:50:12 +0000 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hello! > > The behaviour of date(1) is probably specified by POSIX, but I think, > date -v-1m should at least return a date a month _before_ the current > month. > > Example: > Mi 1 Dez 1999 15:06:47 CET > > (Dez. has 31, so it should be Nov 30, I think). > > More confusing is something like: > alex:~ $ date -v-1m +%Y-%m > 1999-12 > > what I wanted to use to create backup folders for my mail-system (all > mails of the last month are moved to a folder of the last month). > > That's weird, somehow. > > Is this a bug or a feature? > Is this POSIX-compilant? It's an arbitrary choice I made when I wrote the code :-I It's not POSIX I'm afraid. > Do we want an additional option? (I want :-)) I certainly wouldn't object to -V doing the same as -v but rounding down.... this could also decide how to behave when a -v adjusts the time onto a non-existent time (say 1:30 when the clocks go forward). > Alex > > -- > I doubt, therefore I might be. I'm pink, therefore I'm spam. -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message