CURRENT MISSION: Conclude the 2026 soyjak.party hack page, aswell as any pages relating to it, such as the Summer 2026 Crisis page.
Update Quotecord with any relevant info. See the blackboard for more info.

This page is cascading "edit" protected until "$2". The "sysop" right is required to "edit" this page.<div class="mw-warning-logempty">No matching items in log.</div>

Module:Year list

From Soyjak Wiki, the free ensoyclopedia
Revision as of 19:04, 29 March 2026 by Fenriris (talk | contribs) (I will be moving the Template On this day into a module that way years wont need to be hardcoded)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Documentation for this module may be created at Module:Year list/doc

local p = {}

function p.main(frame)
    local args = frame:getParent().args
    local out = {}

    -- Image (optional)
    if args.image and args.image ~= "" then
        table.insert(out, string.format('[[File:%s|150px|right]]', args.image))
    end

    -- Collect year entries
    local years = {}

    for k, v in pairs(args) do
        local year = tonumber(k)
        if year and v and v ~= "" then
            table.insert(years, year)
        end
    end

    table.sort(years)

    for _, year in ipairs(years) do
        table.insert(out, string.format('* %d - %s', year, args[tostring(year)]))
    end

    return table.concat(out, "\n")
end

return p