lua-users home
lua-l archive

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


On Fri, Jun 5, 2015 at 10:13 AM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
> Let us get real. Why would you want an item 2015.0605??

For one, it's today's date, implying that this type of number in
general would be used to represent dates. Which further implies that
he would never have 2015.0000, since there is neither a month number
zero nor a day number zero.

Also, using a float for a date actually makes sense somewhat, as it
allows easy sorting of the dates, as well as arithmetic with a little
work. For example, he could easily subtract one date float from
another to test whether X year(s) have passed between the dates. (But
I'm getting too far off of the topic, so I'll stop there.)