Content deleted Content added
create replacement for Template:British regnal year |
add possibility to add notes at the end |
||
Line 43:
local prevEndYear = t.prevEndYear
local linkPrev = t.linkPrev
local note = t.note
if inputYear > dataYear then
-- Years with the same monarch.
return mw.ustring.format(
'%d %s – %d %s%s',
currentRegnalYear - 1, linkCurrent, currentRegnalYear, linkCurrent, note or ''
)
elseif inputYear == dataYear and prevEndYear and linkPrev then
-- Years with a different monarch.
return mw.ustring.format(
'%d %s – %d %s%s',
prevEndYear, linkPrev, currentRegnalYear, linkCurrent, note or ''
)
else
-- This should only match the year 1066.
return mw.ustring.format(
'%d %s%s',
currentRegnalYear, linkCurrent, note or ''
)
end
|