Jump to content

Module:Sandbox/Gnosygnu

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 68.192.174.14 (talk) at 01:27, 22 January 2016 (os_date_format). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
--This Module is for Lua experimentation. No other pages refer to it.

local p = {}

function p.os_date_format(frame)
  local args = {}
  args.year  = frame.args[2]
  args.month = frame.args[3]
  args.day   = frame.args[4]
  args.hour  = frame.args[5] -- note that 1 set time to 13:00 of that day; should work for most time zones
  args.min   = frame.args[6]
  args.sec   = frame.args[7]
  return os.date(frame.args[1], os.time(args))
end

return p