From owner-freebsd-bugs Thu Apr 27 4:30: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B371337B5D2 for ; Thu, 27 Apr 2000 04:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id EAA76634; Thu, 27 Apr 2000 04:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Thu, 27 Apr 2000 04:30:02 -0700 (PDT) Message-Id: <200004271130.EAA76634@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Anatoly Vorobey Subject: Re: bin/18253: date command does not take -v31d (31st day of month) option Reply-To: Anatoly Vorobey Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/18253; it has been noted by GNATS. From: Anatoly Vorobey To: paulchef@starwon.com.au Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/18253: date command does not take -v31d (31st day of month) option Date: Thu, 27 Apr 2000 14:25:25 +0000 On Thu, Apr 27, 2000 at 03:52:16AM -0700, paulchef@starwon.com.au wrote: > heimdall % date -v31d -v1m -v1999y > 31d: Cannot apply date adjustment date -v1m -v31d -v1999y will work. This is because the day value is checked for validity against the current month, which has not yet been changed to January. I don't know that this is a bug. If fixing it is desirable, walking the 'vary' structure in vary_apply() in src/bin/date/vary.c needs to be changed to first apply year adjustments, then month adjustments, etc. and not in the order of command line arguments. -- Anatoly Vorobey, mellon@pobox.com http://pobox.com/~mellon/ "Angels can fly because they take themselves lightly" - G.K.Chesterton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message