Documentation for this module may be created at Module:VHVersion/doc
local p = {}
function p.formatVersion(frame)
local version = frame.args[1] or frame:getParent().args[1] or ""
if version == "" then
return "No version provided"
end
-- Remove patch version (everything after the last dot)
local majorMinor = version:match("^(.+)%.")
if majorMinor then
return "3." .. majorMinor
else
return "3." .. version
end
end
return p