Modul:Wikidata/Formatters/scale

Z Wikipedie, otevřené encyklopedie

Dokumentaci tohoto modulu lze vytvořit na stránce Modul:Wikidata/Formatters/scale/Dokumentace

local p = {}

local QuantityFormatter = require('Modul:Wikidata/Formatters').Formatters.quantity

local function formatScale(value)
	return mw.ustring.format('1:%s', value)
end

function p.getRawValue(value, options)
	return formatScale(QuantityFormatter.getRawValue(value, options))
end

function p.formatValue(value, options)
	return formatScale(QuantityFormatter.formatValue(value, options))
end

return p