உள்ளடக்கத்துக்குச் செல்

Module:Year category type

கட்டற்ற கலைக்களஞ்சியமான விக்கிப்பீடியாவில் இருந்து.

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

local p = {}

local units = {
	year = "^%d*$",
	year_bc = "கிமு$ ^%d*",
	year_ad = "^கிபி %d*$",
	decade = "^%d*0கள்$",
	decade_bc = "கிமு$ ^%d*0கள்",
	century = "^%d*.நூற்றாண்டு$",
	century_bc = "கிமு$ ^%d*.நூற்றாண்டு",
	millennium = "^%d*.ஆயிரமாண்டு$",
	millennium_bc = "கிமு$ ^%d*.ஆயிரமாண்டு",
}

function p.main(frame)
	local title = mw.title.getCurrentTitle().text

	for unit, pattern in pairs(units) do
		if string.match(title, pattern) then
			return unit
		end
	end

	return -1
end

return p
"https://ta.wikipedia.org/w/index.php?title=Module:Year_category_type&oldid=3532666" இலிருந்து மீள்விக்கப்பட்டது