lua-users home
lua-l archive

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


I think os.time() is the way to go. The only thing missing is a universal date
parser that coverts dates into the os.time() epoch form.

Perhaps a way to encode/decode dates/times without a table would be nice too.

Example:

somedate = os.mktime(2005,08,24,10,20,30)

print(os.date('%c', somedate))
> 08/24/2005 10:20:30

print(os.unpacktime(somedate))
> 2005	08	24	10	20	30


	Having to create a table is expensive sometimes.

Just my $.02 :)

--rb