Module:discussion

Hello, you have come here looking for the meaning of the word Module:discussion. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:discussion, but we will also tell you about its etymology, its characteristics and you will know how to say Module:discussion in singular and plural. Everything you need to know about the word Module:discussion you have here. The definition of the word Module:discussion will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:discussion, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module implements the template {{discussion recent months}}.


local export = {}

function export.recent_months(frame)
	local date = os.date("*t")
	date.month = date.month - 1
	if date.month == 0 then
		date.year = date.year - 1
		date.month = 12
	end
	local last_month = os.time{year = date.year, month = date.month, day = 1}
	
	local content = tostring(mw.html.create("div")
		:tag("h1")
			:wikitext("]")
			:done()
		:wikitext("{{" .. os.date("/%Y/%B", last_month) .. "}}")
		:tag("h1")
			:wikitext("]")
			:done()
		:wikitext("{{" .. os.date("/%Y/%B") .. "}}"))
	
	return frame:preprocess(content)
end

return export