You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Module:Archive-timeline

From Wikitech-static
Revision as of 18:20, 1 August 2019 by imported>Krinkle
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Archive-timeline/doc (Test casesTest results)

-- Short anecdotes by year for use in [[Template:Archive]]
--
local timeline = {
	-- https://en.wikipedia.org/w/index.php?title=1950&oldid=908302504#Events
	["1950"] = "United States President Harry S. Truman orders the development of the hydrogen bomb",

	-- https://en.wikipedia.org/w/index.php?title=2004&oldid=907904157#Events
	["2004"] = "Mark Zuckerberg creates Facebook",

	-- https://en.wikipedia.org/w/index.php?title=2005&oldid=908345713#Events
	["2005"] = "The first YouTube video is uploaded",

	-- https://en.wikipedia.org/w/index.php?title=2006&oldid=907909573#Events
	["2006"] = "The IAU demotes Pluto from planet to the dwarf planet",

	-- https://en.wikipedia.org/w/index.php?title=2007&oldid=906058026#Events
	["2007"] = "Steve Jobs introduces the original Apple iPhone",

	-- https://en.wikipedia.org/w/index.php?title=2008&oldid=908430892#Events
	["2008"] = "The Spotify music streaming service is launched in Sweden",

	-- https://en.wikipedia.org/w/index.php?title=2009&oldid=908645735#Events
	["2009"] = "The first block of the Bitcoin blockchain is established",

	-- https://en.wikipedia.org/w/index.php?title=2010&oldid=908693123#Events
	["2010"] = "The Winter Olympics are held in Vancouver, Canada",

	-- https://en.wikipedia.org/w/index.php?title=2011&oldid=908660745#Events
	["2011"] = "An estimated two billion people watch the wedding of Prince William and Kate Middleton",

	-- https://en.wikipedia.org/w/index.php?title=2012&oldid=907887565#Events
	["2012"] = "Vladimir Putin is elected President of Russia",
}

-- Exported lua module

local p = {}
function p.get_line( frame )
	local year = string.sub( frame.args[1], 0, 4 )
	local text = timeline[ year ] and ("  Historic event in " .. year .. ": " .. timeline[ year ] .. ".") or ""
	return text
end
return p