Content deleted Content added
←Created page with '--Display non-Gregorian holiday dates using equivalent Gregorian date local p = {} --[[--------------------------< inlineError >---------------------...' |
No edit summary |
||
Line 184:
]]
function renderHoli(json,holiday,date,df,format,tname,cite)
local numRecords = tableLength(json.items)
Line 263:
-- return output
if startdate == enddate or json.days == "1" then -- single date
return json.prepend1 .. startdate .. endoutoffset .. cite
else
return json.prepend1 .. startdate .. format .. json.prepend2 .. enddate .. endoutoffset .. cite
end
Line 286:
local df = nil -- date format (mdy, dmy, iso - default: iso)
local format = nil -- template display format options
local cite = nil -- leave a citation at end
track = {} -- global tracking-category table
Line 337 ⟶ 338:
if df ~= "mdy" and df ~= "dmy" and df ~= "iso" then
df = "dmy"
end
-- Determine citation
cite = trimArg(args.cite)
if cite then
if json.citeurl and json.accessdate and json.source and json.holiday then
cite = "<ref name=\"hebcal auto\">{{cite web |url=" .. json.citeurl .. " |title=Dates for " .. json.holiday .. " |publisher=" .. json.source .. " |accessdate=" .. json.accessdate .. "}}</ref>"
else
cite = ""
end
else
cite = ""
end
Line 352 ⟶ 365:
-- Render
local rend = renderHoli(json,holiday,date,df,format,tname,cite)
if not rend then
rend = '<span style="font-size:100%" class="error citation-comment">Error in [[:Template:' .. tname .. ']]: Unknown problem. Please report on template talk page.</span>'
|