Module:FormatNumber: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

    26 June 2022

    • curprev 01:2201:22, 26 June 2022Naginreed talk contribs 671 bytes +671 Created page with "local p = {} p.formatNumber = function(number) -- if it was called via {{#invoke}} then number is a frame object and args[1] is the first argument if type(number) == 'table' then number = number.args[1] end local i, j, minus, int, fraction = tostring(number):find('([-]?)(%d+)([.]?%d*)') if int == nil then return number end -- reverse the int-string and append a separator to all blocks of 3 digits int = int:reverse():gsub("(%d%d%d)", "%1..."