[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Problem with os.date?
- From: Nick Gammon <nick@...>
- Date: Sat, 16 Sep 2006 10:32:13 +1000
On 16/09/2006, at 12:34 AM, Roberto Ierusalimschy wrote:
We will fix that, but it seems that the behavior of os.date("!")
be coherent with that of os.date(""): that is, it should return the
Actually it doesn't, and is just as confusing:
> print (os.date (""))
stdin:1: 'date' format too long
[C]: in function 'date'
stdin:1: in main chunk
The behaviour for a nil argument is the default format of %c.
> print (os.date ())
Sat Sep 16 10:29:49 2006
You could argue that an empty string should return an empty string,
including the case of the string "!".
Alternatively, you could argue that the string "!" is intended to
mean "!%c", although I suppose if you really mean that you may as
well put it there. :)