<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.transpeopletogether.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AFormatPhoneNumber</id>
	<title>Module:FormatPhoneNumber - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.transpeopletogether.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AFormatPhoneNumber"/>
	<link rel="alternate" type="text/html" href="https://www.transpeopletogether.org/w/index.php?title=Module:FormatPhoneNumber&amp;action=history"/>
	<updated>2026-04-18T23:58:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://www.transpeopletogether.org/w/index.php?title=Module:FormatPhoneNumber&amp;diff=984&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;-- 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 &#039;&#039;     -- must start with +     if mw.ustring.sub(input, 1, 1) ~= &#039;+&#039; then         return &#039;&#039;     end      -- match +1-123-456-7890     local area, prefix, line = mw.ustring.m...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.transpeopletogether.org/w/index.php?title=Module:FormatPhoneNumber&amp;diff=984&amp;oldid=prev"/>
		<updated>2025-05-09T01:00:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- 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 &amp;#039;&amp;#039;     -- must start with +     if mw.ustring.sub(input, 1, 1) ~= &amp;#039;+&amp;#039; then         return &amp;#039;&amp;#039;     end      -- match +1-123-456-7890     local area, prefix, line = mw.ustring.m...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module:Phone&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Formats a phone number:&lt;br /&gt;
--  • If it doesn’t start with “+”, returns empty string.&lt;br /&gt;
--  • If it is “+1-AAA-BBB-CCCC”, returns “(AAA) BBB-CCCC”.&lt;br /&gt;
--  • Otherwise, returns the input unchanged.&lt;br /&gt;
function p.format(frame)&lt;br /&gt;
    local input = frame.args[1] or &amp;#039;&amp;#039;&lt;br /&gt;
    -- must start with +&lt;br /&gt;
    if mw.ustring.sub(input, 1, 1) ~= &amp;#039;+&amp;#039; then&lt;br /&gt;
        return &amp;#039;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- match +1-123-456-7890&lt;br /&gt;
    local area, prefix, line = mw.ustring.match(&lt;br /&gt;
        input,&lt;br /&gt;
        &amp;#039;^%+1%-(%d%d%d)%-(%d%d%d)%-(%d%d%d%d)$&amp;#039;&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    if area then&lt;br /&gt;
        return &amp;#039;(&amp;#039; .. area .. &amp;#039;) &amp;#039; .. prefix .. &amp;#039;-&amp;#039; .. line&lt;br /&gt;
    else&lt;br /&gt;
        -- other international formats: leave unchanged&lt;br /&gt;
        return input&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>