Module:Time ago: Difference between revisions

add new feature "|numeric" to print number only
m (1 revision imported)
(add new feature "|numeric" to print number only)
Line 156: Line 156:
else
else
result_num_text = tostring( result_num )
result_num_text = tostring( result_num )
end
-- numeric or string
local numeric_out = args.numeric
local result = ""
if numeric_out then
result = tostring( result_num )
else
result = result_num_text .. ' ' .. result_unit .. suffix -- Spaces for suffix have been added in earlier.
end
end


local result = result_num_text .. ' ' .. result_unit .. suffix -- Spaces for suffix have been added in earlier.
return result .. purge
return result .. purge
end
end
Anonymous user