[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: date arithmetic?
From:       Romulo Bahiense <romulo () icontroller ! com ! br>
Date:       2005-08-24 23:30:19
Message-ID: 430D030B.5030506 () icontroller ! com ! br
[Download RAW message or body]

> 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic