lua-users home
lua-l archive

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



On May 6, 2009, at 7:33 PM, Diego - Red Baires wrote:

is this correct ?will this work to all locales ?what about comparing times ? (i mean, if a time is between two values)

As mentioned by Robert, this is not going to fly very far as you would be comparing two random strings... you could use a more comparison friendly string representation such as ISO 8601 or something, e.g. 1997-07-16T19:20:30.45... but you will be better off using a numerical representation such as the one returned by os.time():

http://www.lua.org/manual/5.1/manual.html#pdf-os.time