bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#11115: linux date arithmetic


From: Eric Blake
Subject: Re: bug#11115: linux date arithmetic
Date: Wed, 28 Mar 2012 15:59:28 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0

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.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]