GNU bug report logs - #11115
linux date arithmetic

Previous Next

Package: coreutils;

Reported by: Stefan Karamuz <stefan <at> karamuz.pl>

Date: Wed, 28 Mar 2012 17:59:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ruediger Meier <sweet_f_a <at> gmx.de>
To: 11115 <at> debbugs.gnu.org
Subject: bug#11115: linux date arithmetic
Date: Thu, 29 Mar 2012 02:17:11 +0100
On Wednesday 28 March 2012, Eric Blake wrote:
> On 03/28/2012 03:23 PM, Bruno Haible wrote:
> > Eric Blake wrote:
> >> the parser is faced with an ambiguity between:
> >>
> >> (11:38 +1) minute
> >> 11:38 (+1 minute)
> >
> > What is the first interpretation meant to mean?
>
> The time 11:38 in the timezone UTC+1, plus the unit represented by
> 'minute'.
>
> > "10:38 minute" or "12:38 minute" is not a time designation I have
> > ever heard in spoken nor written English.
>
> True, 'minute' in isolation, without a 'plus one' qualifier, is
> unusual; but we have to continue to parse it in isolation since
> scripts may now be relying on it.
>
> > If you ditch this interpretation, there is no ambiguity.
>
> Yes, we're in violent agreement here: the added context of a +1 (and
> in particular, of a '+ 1' with a space after the +), should indeed
> favor the spoken preference of a time with no timezone, followed by a
> completed relative designation; rather than of a relative designation
> with only an implied quantity.  It's just that getdate.y is a hairy
> mess to properly implement that change without breaking other
> worthwhile constructs, so I won't be the one volunteering.

BTW there is an interesting dateutils project not yet finished but worth 
to have look
https://github.com/hroptatyr/dateutils

cu,
Rudi




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

Previous Next


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