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