Module:Calendar date/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 390:
df = trimArg(args.df)
if not df then
if jsoncfg.main.evenevent[it].df then
df = jsoncfg.main.evenevent[it].df
else
df = "dmy"
Line 405:
cite = ""
if isAvail == "localjson" then
if jsoncfg.main.evenevent[it].citeurl and jsoncfg.main.evenevent[it].accessdate and jsoncfg.main.evenevent[it].source and jsoncfg.main.evenevent[it].holiday then
cite = frame:preprocess('<ref name="' .. holiday .. ' dates">{{cite web |url=' .. jsoncfg.main.evenevent[it].citeurl .. ' |title=Dates for ' .. jsoncfg.main.evenevent[it].holiday .. ' |publisher=' .. jsoncfg.main.evenevent[it].source .. ' |via=[[Template:' .. tname .. '|' .. tname .. ']] and [[Template:' .. tname .. '/holidays/' .. holiday .. '.js|' .. holiday .. '.js]] |accessdate=' .. jsoncfg.main.evenevent[it].accessdate .. '}}</ref>')
end
elseif isAvail == "calculator" then
if jsoncfg.main.evenevent[it].source then
cite = frame:preprocess('<ref name="' .. holiday .. ' dates">' .. jsoncfg.main.evenevent[it].source .. '</ref>')
end
end
Line 416:
 
--- Determine pre-pended text eg. "sunset, <date>"
if not jsoncfg.main.evenevent[it].prepend1 then
jsoncfg.main.evenevent[it].prepend1 = ""
else
jsoncfg.main.evenevent[it].prepend1 = jsoncfg.main.evenevent[it].prepend1 .. ", "
end
if not jsoncfg.main.evenevent[it].prepend2 then
jsoncfg.main.evenevent[it].prepend2 = ""
else
jsoncfg.main.evenevent[it].prepend2 = jsoncfg.main.evenevent[it].prepend2 .. ", "
end