Logo

Programming-Idioms

History of Idiom 61 > diff from v31 to v32

Edit summary for version 32 by :
New Lua implementation by user [Nepta]

Version 31

2016-04-05, 04:35:48

Version 32

2016-04-07, 09:30:56

Idiom #61 Get current date

Assign to variable d the current date/time value, in the most standard type.

Idiom #61 Get current date

Assign to variable d the current date/time value, in the most standard type.

Code
date = os.date()
time = os.time()
Comments bubble
os.date return a formated date
os.time return second since epoch
Doc URL
http://www.lua.org/manual/5.3/manual.html#pdf-os.date
Demo URL
http://codepad.org/JC0Pfdfy