From owner-svn-src-all@FreeBSD.ORG Sat Jun 12 02:00:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A88C1065676; Sat, 12 Jun 2010 02:00:15 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5981B8FC12; Sat, 12 Jun 2010 02:00:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5C20FAw055922; Sat, 12 Jun 2010 02:00:15 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5C20Fkk055920; Sat, 12 Jun 2010 02:00:15 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201006120200.o5C20Fkk055920@svn.freebsd.org> From: Brian Somers Date: Sat, 12 Jun 2010 02:00:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209086 - stable/8/bin/date X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2010 02:00:15 -0000 Author: brian Date: Sat Jun 12 02:00:15 2010 New Revision: 209086 URL: http://svn.freebsd.org/changeset/base/209086 Log: MFC r208795; additional date -v detail PR: 147354 Approved by: re (kib) Modified: stable/8/bin/date/date.1 Directory Properties: stable/8/bin/date/ (props changed) Modified: stable/8/bin/date/date.1 ============================================================================== --- stable/8/bin/date/date.1 Sat Jun 12 01:45:29 2010 (r209085) +++ stable/8/bin/date/date.1 Sat Jun 12 02:00:15 2010 (r209086) @@ -32,7 +32,7 @@ .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd June 2, 2007 +.Dd June 3, 2010 .Dt DATE 1 .Os .Sh NAME @@ -219,6 +219,14 @@ When the date is adjusted to a specific the resulting timezone will be set so that the date matches the earlier of the two times. .Pp +It is not possible to adjust a date to an invalid absolute day, so using +the switches +.Fl v No 31d Fl v No 12m +will simply fail five months of the year. +It is therefore usual to set the month before setting the day; using +.Fl v No 12m Fl v No 31d +always works. +.Pp Adjusting the date by months is inherently ambiguous because a month is a unit of variable length depending on the current date. This kind of date adjustment is applied in the most intuitive way. @@ -339,9 +347,9 @@ will display the last day of February in .Pp .Dl "Tue Feb 29 03:18:00 GMT 2000" .Pp -So will do the command: +So will the command: .Pp -.Dl "date -v30d -v3m -v0y -v-1m" +.Dl "date -v3m -v30d -v0y -v-1m" .Pp because there is no such date as the 30th of February. .Pp