Content deleted Content added
oh so like it's not actually wikitext it returns |
(re)make dt metadata emitter |
||
Line 646:
]]
function main.emitMetadata(frame)
-- First parse the date and see if we get a valid output date
local
if (not date) then return nil end▼
-- We are only doing this for a valid date
local dtstartSpan, dtendSpan
-- If we have a start value and we're told to output it
if ((startDate or startTime) and frame.args.dtstart and frame.args.dtstart == 'yes') then
if (startDate and startTime) then dtstartSpan = '<span class="dtstart">' .. startDate .. 'T' .. startTime .. '</span>'
elseif (startDate) then dtstartSpan = '<span class="dtstart">' .. startDate .. '</span>'
else dtstartSpan = '<span class="dtstart">' .. startTime .. '</span>' end
end
-- If we have an end value and we're told to output it
if ((endDate or endTime) and frame.args.dtend and frame.args.dtend == 'yes') then -- end values only happen when start values happen
if (endDate and endTime) then dtstartSpan = '<span class="dtstart">' .. endDate .. 'T' .. endTime .. '</span>'
elseif (endDate) then dtstartSpan = '<span class="dtstart">' .. endDate .. '</span>'
else dtstartSpan = '<span class="dtstart">' .. endTime .. '</span>' end
end
if (dtstartSpan and dtendSpan) then return '<span style="display:none"> (
elseif (dtstartSpan) then return '<span style="display:none"> (' .. dtstartSpan .. ')</span>'
elseif (dtendSpan) then return '<span style="display:none"> (' .. dtendSpan .. ')</span>'
else return nil end
end
--[[
|