Module:User:Eirikr/sandbox
Appearance
- This module sandbox lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox of (diff)
local export = {}
local gsub = mw.ustring.gsub
local find = mw.ustring.find
local gmatch = mw.ustring.gmatch
local match = mw.ustring.match
local sub = mw.ustring.sub
local U = mw.ustring.char
function export.talk_page_archive_links(frame)
local archives = require "Module:array"()
-- Up to current year; see http://man7.org/linux/man-pages/man3/strftime.3.html.
for year = 2006, os.date("%Y") do
local talk_page_title = "User talk:Eirikr/" .. year
if mw.title.new(talk_page_title).exists then
archives:insert("[[" .. talk_page_title .. "|" .. year .. "]]")
end
end
return archives:concat(" – ")
end
function export.testing(frame)
return "Eggplant!"
end
return export