Module:FormatPhoneNumber: Revision history

From Trans People Together Wiki

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.

8 May 2025

  • curprev 18:0018:00, 8 May 2025 Admin talk contribs 735 bytes +735 Created page with "-- Module:Phone local p = {} -- Formats a phone number: -- • If it doesn’t start with “+”, returns empty string. -- • If it is “+1-AAA-BBB-CCCC”, returns “(AAA) BBB-CCCC”. -- • Otherwise, returns the input unchanged. function p.format(frame) local input = frame.args[1] or '' -- must start with + if mw.ustring.sub(input, 1, 1) ~= '+' then return '' end -- match +1-123-456-7890 local area, prefix, line = mw.ustring.m..."