Content deleted Content added
Andreyyshore (talk | contribs) No edit summary |
Andreyyshore (talk | contribs) No edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 8:
local month2 = tonumber(frame.args.month2 or frame.args[5])
local day2 = tonumber(frame.args.day2 or frame.args[6])
local
local livetext = frame.args.livetext or "Live Event"
local text = frame.args.text
local time1 = nil
local time2 = nil
local bgcolor = "#
local textcolor = "#
local span = mw.html.create("span")
span:css{
["
["font-weight"] = "bold",
["font-style"] = "italic",
Line 24 ⟶ 26:
}
if
span
:css{background = bgcolor, color = textcolor}
:wikitext(
return tostring(span)
end▼
if day2 == nil or month2 == nil or year2 == nil then▼
day2 = day1▼
month2 = month1▼
year2 = year1▼
end
Line 43 ⟶ 39:
}}
time1 = tonumber(time1:gsub("−", "-") .. "")▼
time2 = frame:expandTemplate{title = "Age in days", args = {▼
}}▼
▲ if day2 == nil or month2 == nil or year2 == nil then
▲ time1 = tonumber(time1)
else
time2 = tonumber(time2:gsub("−", "-") .. "")
▲ end
if time1 > 0 then
bgcolor = "#
if time1 > 1 then
elseif time2 < 0 then
bgcolor = "#
text = endtext
else
bgcolor = "#
end
Line 69:
span
:css{background = bgcolor, color = textcolor}
:wikitext(
return tostring(span)
|