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

require 'Modul:No globals'

local p = {}

local parent = require 'Modul:Wikidata/Formatters/quantity'

p.getRawValue = parent.getRawValue

function p.formatNumber(value, options)
	local frame = mw.getCurrentFrame()
	local hours, minutes, seconds = math.modf(value / 15)
	minutes, seconds = math.modf(minutes * 60)
	seconds = seconds * 60
	return frame:expandTemplate{
		title = 'Rektascenze',
		args = {
			parent.formatNumber(hours, {}),
			parent.formatNumber(minutes, {}),
			parent.formatNumber(seconds, { round = 4 })
		}
	}
end

p.formatRawValue = p.formatNumber

function p.formatValue(value, options)
	parent.setFormatNumber(p.formatNumber)
	return parent._formatValue(value, options)
end

return p