Module:Time/sandbox: Difference between revisions

Content deleted Content added
No edit summary
Undid revision 863172694 by BrandonXLF (talk)
Line 1:
require ('Module:No globals')
local getArgs = require ('Module:Arguments').getArgs
local tz = {}; -- holds local copy of the specified timezone table from tz_data{}
local cfg = data.cfg{}; -- get thefor configurationinternationalization table
 
--[[-------------------------< S E T _ S A N D B O X >--------------------------------------------------------
Line 24 ⟶ 26:
end
 
---------------------------------------------------------------------------------------------------------------
 
local tz = {}; -- holds local copy of the specified timezone table from tz_data{}
local data = 'Module:Time/data'..set_sandbox(frame) -- make a data module name; sandbox or live
local data = mw.loadData (data); -- load the data module
local cfg = data.cfg; -- get the configuration table
 
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Line 238 ⟶ 233:
dst_end = dst_end - utc_offset; -- adjust local time to utc by subtracting utc offset
end
 
 
if dst_b_month > dst_e_month then
Line 359 ⟶ 355:
end
 
local function dst_active (frame) -- call from #invoke
--[=[-------------------------< D S T _ A C T I V E >---------------------------------------------------------
 
#invoke version of is_dst_active
 
]=]
 
local function dst_active (frame)
local args = getArgs (frame);
return is_dst_active (timestamp,utc_timestamp)
Line 395 ⟶ 385:
local DF; -- date format flag; the |df= parameter
local is_dst; -- wether or not dst is active
local data = 'Module:Time/data'..set_sandbox(frame) -- make a data module name; sandbox or live
local data = mw.loadData (data); -- load the data module
cfg = data.cfg; -- get the configuration table
local formats = data.formats;
local tz_aliases = {}
Line 528 ⟶ 521:
return time_string..tz_tag..refresh_link
 
end