Editing Module:Date
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 696: | Line 696: | ||
-- A table to get the current date/time (UTC), but only if needed. | -- A table to get the current date/time (UTC), but only if needed. | ||
local current = setmetatable({}, { | -- A local test can set the global variable to produce fixed results. | ||
local current = setmetatable( | |||
set_current_for_test or {}, { | |||
__index = function (self, key) | __index = function (self, key) | ||
local d = os.date('!*t') | local d = os.date('!*t') |