Subject: Re: bug#11115: linux date arithmetic

From: Bruno Haible <[email-masked]>
Date: Thu, 29 Mar 2012 11:21:40 +0200

Eric Blake wrote:
> > "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.

No, we don't have to support syntaxes that are not documented and that
were only accidentally supported. Scripts may rely on documented features,
not on undocumented ones.

The doc in parse-datetime.texi explains that the literal word 'minute'
occurs only as part of a displacement. Thus it has to follow a number.
It can not occur after a literal time ("10:38" or "12:38") nor after a
time with displacement ("11:38 +1").

IMO spaces are irrelevant in this discussion.

> It's just that getdate.y is a hairy mess
> to properly implement that change without breaking other worthwhile
> constructs

I would remove the "tMINUTE_UNIT" alternative from 'relunit' and move it
instead to the rules that invoke 'relunit' and that need this alternative.

Bruno