Module:Calendar date/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 372:
return inlineError("holiday", 'File missing: Template:' .. jsoncfg.main.event[it].datasource, tname) .. createTracking()
end
jsonlocal = (version.isRedirect and mw.text.jsonDecode( version.redirectTarget:getContent() )) or mw.text.jsonDecode( version:getContent() )
if version.isRedirect then
jsonlocal = mw.text.jsonDecode( version.redirectTarget:getContent() )
else
jsonlocal = mw.text.jsonDecode( version:getContent() )
end
elseif isAvail == "calculator" then -- dates are calculated with a user-provided calculator
jsoncfg.main.event[it].datasource = frame:preprocess(jsoncfg.main.event[it].datasource:gsub("^<nowiki>", ''):gsub("</[ ]*nowiki>$", ''):gsub("YYYY", date))
Line 389 ⟶ 385:
df = trimArg(args.df)
if not df then
ifdf = (jsoncfg.main.event[it].df thenand jsoncfg.main.event[it].df) or "dmy"
df = jsoncfg.main.event[it].df
else
df = "dmy"
end
end
if df ~= "mdy" and df ~= "dmy" and df ~= "iso" then
Line 409 ⟶ 401:
elseif isAvail == "calculator" then
cite = (jsoncfg.main.event[it].source and (frame:preprocess('<ref name="' .. holiday .. ' dates">' .. jsoncfg.main.event[it].source .. '</ref>')))
-- if jsoncfg.main.event[it].source then
-- cite = frame:preprocess('<ref name="' .. holiday .. ' dates">' .. jsoncfg.main.event[it].source .. '</ref>')
-- end
end
else