Content deleted Content added
No edit summary |
No edit summary |
||
Line 150:
function renderHoli(json,holiday,date,df,format)
local numRecords = tableLength(json.items)
local hits = 0
local matchdate = "^" .. date
local startdate,enddate = ""
for i = 1, numRecords do
if mw.ustring.find( json.items[i].date, matchdate ) then
if hits == 0 then
startdate = json.items[i].date
hits = 1
-- goto continue
end
hits = hits + 1
-- ::continue::
if hits >= json.items[i].days then
enddate = json.items[i].date
break
end
end
end
return startdate .. " - " .. enddate
end
Line 208 ⟶ 228:
rend = renderHoli(json,holiday,date,df,format)
return
end
|