Anonymous user
Module:Time ago: Difference between revisions
see if we can do away with all of those math.floor calls
(Indent if statements. Blocks inside if statements have lexical scope, so it is a lot clearer which block has which scope if you indent. (Also see Wikipedia:Lua style guide.)) |
(see if we can do away with all of those math.floor calls) |
||
Line 43:
else
-- Calculate the appropriate unit of time if it was not specified as an argument.
if
auto_magnitude_num = 60
else
auto_magnitude_num = 1
end
if
auto_magnitude_num = 3600
end
if
auto_magnitude_num = 86400
end
if
auto_magnitude_num = 2678400
end
if
auto_magnitude_num = 31557600
end
|