View source for Module:Hms
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
function p._error( error_str )
return '[[Category:Duration with input error]]<strong class="error">Error in Module:Hms: ' .. error_str .. '</strong>'
end
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {wrappers = {'Template:Duration', 'Template:Duration/sandbox'}})
local tmp = args.duration or args[1] or ''
local duration = {}
if tonumber(args[1]) or args[2] or args[3] then
if args[4] then return p._error('Parameter number 4 should not be specified') end
if not args[1] or args[1] == '' then
duration = {args[2] or 0, args[3] or 0}
else
duration = {args[1], args[2] or 0, args[3] or 0}
end
tmp = nil
for k, v in ipairs(duration) do
duration[k] = tonumber(v)
000
1:0
Return to Module:Hms.