lua-users home
lua-l archive

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


PA wrote:
> How does one do date arithmetic in Lua?

I'm probably missing something but I think you can simply add the appropriate
offset to os.time, as in:

  > =os.date()
  Wed Aug 24 09:00:23 2005
  > =os.date("%c",os.time()+12345)
  Wed Aug 24 12:26:12 2005

--lhf