-
-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phone number: Correct the format #2317
Conversation
True, but most of the tests use the old format, so that might be a bit weird. |
@@ -11,12 +11,14 @@ The first three digits of the local number represent the *exchange code*, follow | |||
The format is usually represented as | |||
|
|||
```text | |||
(NXX)-NXX-XXXX | |||
NXX NXX-XXXX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might show both that are often used...
The tests are not going to differentiate in a way that errors, but will present it as a cleaned version.
Here we are showing what is "usually" represented, and I might think that
(NXX) NXX-XXXX
And
(NXX)NXX-XXXX
are pretty evenly tied in the usual use.
I totally agree with using either with parenthesis or or dash to separate the area code from either or both sides of that, never both at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also change "usually" to "sometimes" and not worry about what is commonly used where 😄
In response to the comments in general, I think the point is that the tests provide different formats but really the input format is irrelevant - what matters is that it gets normalised. So I think we should make the description actively generic, rather than more specific. If that makes sense? |
Totally agree |
Context: https://forum.exercism.org/t/nanp-phone-numbers/7179/1
This shouldn't change any tests, so I think it's pretty safe to merge.