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

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 25 Jun 2017 12:32:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: 27482 <at> debbugs.gnu.org
Subject: bug#27482: date: minus and ago in same sentence
Date: Sun, 25 Jun 2017 18:53:29 +0800
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 ‘two weeks ago’
$ date -d 'now - two weeks ago'
date: invalid date ‘now - two weeks ago’
$ 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...




This bug report was last modified 6 years and 234 days ago.

Previous Next


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