Skip to content

Commit

Permalink
Add 839 South Carolina area code
Browse files Browse the repository at this point in the history
  • Loading branch information
riebeekn committed Sep 18, 2023
1 parent a5ac6e7 commit e4c7a62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/phone/nanp/us/sc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ defmodule Phone.NANP.US.SC do

use Helper.Area

def regex, do: ~r/^(1)(803|843|854|864)([2-9].{6})$/
def regex, do: ~r/^(1)(803|839|843|854|864)([2-9].{6})$/
def area_name, do: "South Carolina"
def area_type, do: "state"
def area_abbreviation, do: "SC"

matcher(["1803", "1843", "1854", "1864"])
matcher(["1803", "1839", "1843", "1854", "1864"])
end
2 changes: 1 addition & 1 deletion test/phone/e_countries/es_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ defmodule Phone.ESTest do

describe "Spanish mobile numbers" do
module = Phone.ES.Mobile

Enum.map(module.codes, fn code ->
test "#{inspect(module)} parses area code #{code}" do
assert Phone.valid?(unquote("#{code}5555555"))
Expand All @@ -131,7 +132,6 @@ defmodule Phone.ESTest do
end
end
end)

end

describe "Spanish intelligent numbers" do
Expand Down

0 comments on commit e4c7a62

Please sign in to comment.