Module:Birthday

From Story Lists
Revision as of 13:25, 9 May 2021 by DanielCM (talk | contribs)
Jump to navigation Jump to search

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

local p = {}

function p.main(frame)
	local titleObject = mw.title.getCurrentTitle()
	local titleText = titleObject.fullText

	local date = mw.ustring.gsub(titleText, "List of characters born on ", "") 

	local month = ""

	if (mw.ustring.find(date, "August")) then
		month = "8"
	end

	local result = "This is a list of characters born on " .. date .. " --- test: " .. mw.ustring.find(date, "August") .. "test test" .. month ..  "."

	local result  = result .. "[[Category:Lists]]"
	local result  = result .. "[[Category:Lists of characters by birthday]]"

	return result
end

return p