Search
 
SCRIPT & CODE EXAMPLE
 

LUA

lua string to date

s="Sat, 29 Oct 1994 19:43:31 GMT"
p="%a+, (%d+) (%a+) (%d+) (%d+):(%d+):(%d+) GMT"
day,month,year,hour,min,sec=s:match(p)
MON={Jan=1,Feb=2,Mar=3,Apr=4,May=5,Jun=6,Jul=7,Aug=8,Sep=9,Oct=10,Nov=11,Dec=12}
month=MON[month]
offset=os.time()-os.time(os.date("!*t"))
print(os.time({day=day,month=month,year=year,hour=hour,min=min,sec=sec})+offset)
Comment

PREVIOUS NEXT
Code Example
Lua :: lua script 
Lua :: lua calculator 
Lua :: how to split strings into 2 string by space lua 
Lua :: lua counting 
Lua :: lua class 
Lua :: how to make everyone on team see name roblox 
Lua :: finding humanoid roblox. part 
Lua :: lua unpack 5.4 
Lua :: how to make a day/night script roblox 
Lua :: LUKAO150 
Lua :: how do i use the love enums module lua assist 
Lua :: C++ 914 card 
Lua :: lua class example 
Matlab :: if directory exist matlab 
Matlab :: transfer function get num and den matlab 
Matlab :: matlab label size 
Matlab :: matlab avoid plot to get focus 
Basic :: git access token 
Basic :: c++ code to c code converter 
Elixir :: elixir rescue 
Elixir :: elixir enum any 
Elixir :: elixir with 
Scala :: find a list of strings inside string scala 
Actionscript :: read pdf web on android 
Excel :: excel highlight rows where column matches text 
Perl :: perl add key to hash 
Pascal :: pascal pause 
Powershell :: takeown cmd 
Clojure :: Clojure defn 
Assembly :: assembly fibonacci 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =