From owner-freebsd-bugs Thu May 31 16:29:32 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A138F37B422; Thu, 31 May 2001 16:29:30 -0700 (PDT) (envelope-from brian@FreeBSD.org) Received: (from brian@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4VNTUE08684; Thu, 31 May 2001 16:29:30 -0700 (PDT) (envelope-from brian) Date: Thu, 31 May 2001 16:29:30 -0700 (PDT) From: Message-Id: <200105312329.f4VNTUE08684@freefall.freebsd.org> To: jabley@mfnx.net, brian@FreeBSD.org, freebsd-bugs@FreeBSD.org, brian@FreeBSD.org Subject: Re: bin/27796: Use of -v flag of date(1) can give non-intuitive results Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Synopsis: Use of -v flag of date(1) can give non-intuitive results State-Changed-From-To: open->feedback State-Changed-By: brian State-Changed-When: Thu May 31 16:28:17 PDT 2001 State-Changed-Why: Adjusting the date is not as straight forward as some might think. To find out what ``next month'' is you should ``date -v1d -v+1m +%m'' as there is always a ``day 1'' in each month. Your example is avoided in the man page as this rounding is done by mktime(3). Another good (confusing) example is ``date -v3m -v29d -v-1m''. If you (or anyone) care to produce documentation patches, I'm certainly happy to see if I can get them past a freebsd-doc review :) Responsible-Changed-From-To: freebsd-bugs->brian Responsible-Changed-By: brian Responsible-Changed-When: Thu May 31 16:28:17 PDT 2001 Responsible-Changed-Why: date -v is my fault^w^wmine http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27796 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message