lua-users home
lua-l archive

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


Dear friends

I have  the following lua code and i want to get the current day and
the previous day

---------------------------------------------------------------------------------

--get the system current date

dd = os.date('%Y%m%d')

print (dd)

--get the system previous date

kk = dd - 1

print (kk)

--------------------------------------------------------------------------------------


the output looks like

--20100901
--20100900

but it should look like

--20100901
--20100831

plz help me to solve this problem

thank you all