GNU bug report logs - #27482
date: add support for words: "one", "two", etc.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: 積丹尼 Dan Jacobson <jidanni@HIDDEN>; dated Sun, 25 Jun 2017 12:32:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Changed bug title to 'date: add support for words: "one", "two", etc.' from 'date: minus and ago in same sentence' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Jun 2017 12:31:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 25 08:31:27 2017
Received: from localhost ([127.0.0.1]:36390 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dP6hK-0004GN-SN
	for submit <at> debbugs.gnu.org; Sun, 25 Jun 2017 08:31:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49209)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1dP6hJ-0004GA-4k
 for submit <at> debbugs.gnu.org; Sun, 25 Jun 2017 08:31:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1dP6hB-0006UZ-P4
 for submit <at> debbugs.gnu.org; Sun, 25 Jun 2017 08:31:19 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40722)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1dP6hB-0006US-JY
 for submit <at> debbugs.gnu.org; Sun, 25 Jun 2017 08:31:17 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40157)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1dP6h9-00082o-QM
 for bug-coreutils@HIDDEN; Sun, 25 Jun 2017 08:31:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1dP6gj-0006Kn-6B
 for bug-coreutils@HIDDEN; Sun, 25 Jun 2017 08:31:15 -0400
Received: from homie.mail.dreamhost.com ([208.97.132.208]:52655
 helo=homiemail-a38.g.dreamhost.com)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1dP6gi-0006IS-MY
 for bug-coreutils@HIDDEN; Sun, 25 Jun 2017 08:30:48 -0400
Received: from homiemail-a38.g.dreamhost.com (localhost [127.0.0.1])
 by homiemail-a38.g.dreamhost.com (Postfix) with ESMTP id 8E71B10AFB5
 for <bug-coreutils@HIDDEN>; Sun, 25 Jun 2017 05:30:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to
 :subject:date:message-id:mime-version:content-type:
 content-transfer-encoding; s=jidanni.org; bh=0TI0M78hFs/SzanFljC
 6EHsFZbo=; b=YZ7sNwI/pIsJnkJFqVwQznQKUpybnE76jmOOjhZyxr8bW/tbAgD
 4phU8HleTYO6Bu66y1C2SuuC0gfqQRZHfC302kB7xrYDUtMRU0yRg0G2x32e2o4R
 jqP0yX8yS52aFr9lkUM2YaTtq2xw/0VP1UTrSL10mYPjrbRsgRuwxCqM=
Received: from jidanni.org (114-46-57-78.dynamic-ip.hinet.net [114.46.57.78])
 (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by homiemail-a38.g.dreamhost.com (Postfix) with ESMTPSA id 4472510AFA5
 for <bug-coreutils@HIDDEN>; Sun, 25 Jun 2017 05:30:44 -0700 (PDT)
From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
To: bug-coreutils@HIDDEN
Subject: date: minus and ago in same sentence
Date: Sun, 25 Jun 2017 18:53:29 +0800
Message-ID: <87k240s5hy.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

I got an idea.
Please parse "one", "two", "three".... (lower and upper case folded too.)
1. Because it is proper English. "1 day ago" is cellphone English.
2. Because there can't be that many of them... (seventy-three,
seventy-four... well they are made up of other components...)
3. Because it will avoid the user getting these surprising results,
$ date -d 'two weeks ago'
date: invalid date =E2=80=98two weeks ago=E2=80=99
$ date -d 'now - two weeks ago'
date: invalid date =E2=80=98now - two weeks ago=E2=80=99
$ date -d 'now - 2 weeks ago'
Sun Jul  9 18:39:23 CST 2017

Or just catch the error of "-" and "ago" in the same sentence.

Or perhaps warn on (info "(coreutils) Relative items in date strings")
about minus and ago...




Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#27482; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.