Today i shared two mini library for lua , maybe it could be useful to some or not
Date : Create/Edit/Get a date.
Sample :
Code:
-- Constructor
local date = date:new()
-- Get date method
local day, month, year, hour, min, second = date:getDate()
local str = date:format("%d/%m/%Y %H:%M:%S")
local time = date:getTimespamp()
-- Add date method
date:addDay(1)
-- Set date method
date:setDate(day, month, year, hour, min, 0)
date:setMonth(2)
Sample :
Code:
-- Constructor
local list = list:new()
-- Get date method
list:totable("{'test2','test3'}") -- From string
list:load("mylist") -- From global_variable
list:save("mylist") -- To global_variable
-- Manage list method
list:insert("test50")
list:removeAt(1)
-- Get list method
cprint("first -> ".. list:first() )
cprint("last -> ".. list:last() )







