Here naverokê

Modul:Year category type

Ji Wîkîpediya, ensîklopediya azad.
Belgekirina modulê[biafirîne]
local p = {}

local units = {
	year = "^%d*$",
	year_bc = "^%d* b\.z\.$",
	year_ad = "^%d* p\.z\.$",
	decade = "^%d*0î$",
	decade_bc = "^%d*0î b\.z\.$",
	century = "^Sedsala %d*[an][ê]$",
	century_bc = "^Sedsala %d*[an][ê] b\.z\.$",
	millennium = "^Hezarsala %d*[an][ê]$",
	millennium_bc = "^Hezarsala %d*[an][ê] b\.z\.$",
}

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