Module:Sandbox/BrandonXLF/1

This is an old revision of this page, as edited by BrandonXLF (talk | contribs) at 16:38, 9 September 2018. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

-- Keep Here
local p = {}
local args = {}
function p.main()
	args[1] = "6.7"
	if mw.ustring.match (args[1], '[%+%-±−]?%d%.%d+') == args[1] then		    -- eg: +5.5
		houoff = mw.ustring.match (args[1], '%d')
		minoff = args[1]*100
		sign2 = mw.ustring.match (args[1],'[%+%-±−]?')
		minoff =  minoff-(args[1]*100)
		minoff = minoff*0.6
		args[1] = table.concat ({houoff,':',minoff})
	end
	return args[1]
end
return p