Documentation for this module may be created at Module:Sandbox/tricoteuses/sometest/doc
local wd = require 'Module:Wd'
local p = {}
function p.legislative_session(frame)
local args = {}
for k,v in pairs(frame:getParent().args) do
args[k] = mw.text.trim(v)
end
local end_time = wd._property({ args[1], "P582"})
local start_time = wd._property({ args[1], "P580"})
local label = string.match(wd._label({ args[1] }), "(.*)%(.*%)")
local end_start
local style
if end_time == start_time then
style = "align=\"center\" style=\"background-color:#E8E9E9\""
end_start = "\n| " .. style .. " colspan=2 | " .. start_time
else
style = "align=\"center\" "
end_start = "\n| " .. style .. " | ".. start_time .. "\n| " .. style .. " | " .. end_time
end
return "\n| " .. label .. end_start
end
return p