GNU bug report logs -
#27482
date: add support for words: "one", "two", etc.
Previous Next
Full log
View this message in rfc822 format
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.