Live data from Hacker News

Google's phone number handling library

code.google.com

31–40 of 44 posts

Re: Google's phone number handling library

#31
post #27

Is there such a thing as an address library? I imagine something with a standard format, and a table schema you can just put into any app and have a functioning contacts list. Preferably a ruby gem maybe?

Having worked on that a bit (I wrote the schema for planning applications in Scotland) ... that stuff is a mess. Take a read of this for starters:

http://www.mjt.me.uk/posts/falsehoods-programmers-believe-ab...

The requirements for the work I did meant that we had to support the UK's NLPG standard for addresses which didn't even work for the house I live in so I knew I was off to a bad start :)

Re: Google's phone number handling library

#32

Not entirely sure how this made front page, but it is a super handy lib. I don't understand why Android includes this lib in their source but makes it internal so you have to provide your own copy if you want to use it in your app: https://android.googlesource.com/platform/external/libphonen...

I posted it after one of our engineers discovered that this is a hard problem!

We were trying to use Twilio and Authy on an application but they handle phone numbers in a different way. Say you accept a phone number from Argentina, to call mobile phones from outside the country you need to add a 9. Twilio accepts that 9 and correctly sends SMS or calls to that number but Authy only accepts the local number format without the 9 and have a big IF to add the 9 internally. So, if for some reason the application must use a phone number in Twilio AND Authy you will need to accept two phone numbers from the user (that are the same in different formats), which is... annoying.

Re: Google's phone number handling library

#34

Ha, good to see this here - so incredibly useful, and already ported to lots of useful languages. Handling phone numbers gets messy really quickly: formatting/validation for national/international numbers, in different forms (land-line/mobile/premium etc), in hundreds of different countries... These guys have done a great job, and are also super responsive/helpful when you raise issues. A word of warning: if you ever…

I did phone numbers validation in the front end, and I yes the expected couple hours ended up being multiple days of works and I ended up using google's validator!

thanks for the jquery plugin, I'll definitely keep it in mind!

Re: Google's phone number handling library

#36

Ha, good to see this here - so incredibly useful, and already ported to lots of useful languages. Handling phone numbers gets messy really quickly: formatting/validation for national/international numbers, in different forms (land-line/mobile/premium etc), in hundreds of different countries... These guys have done a great job, and are also super responsive/helpful when you raise issues. A word of warning: if you ever…

Looks awesome; will consider using this in the future.

One note: it would be nice if you explicitly stated, in the LICENSE file or the readme, that this is under the MIT license. It'd make it easier to use this at companies (like mine) where open source packages can only be used if their license is on a legal-department-approved whitelist.

Re: Google's phone number handling library

#37

Ha, good to see this here - so incredibly useful, and already ported to lots of useful languages. Handling phone numbers gets messy really quickly: formatting/validation for national/international numbers, in different forms (land-line/mobile/premium etc), in hundreds of different countries... These guys have done a great job, and are also super responsive/helpful when you raise issues. A word of warning: if you ever…

Please make this a node package at some point.

Re: Google's phone number handling library

#39

Ha, good to see this here - so incredibly useful, and already ported to lots of useful languages. Handling phone numbers gets messy really quickly: formatting/validation for national/international numbers, in different forms (land-line/mobile/premium etc), in hundreds of different countries... These guys have done a great job, and are also super responsive/helpful when you raise issues. A word of warning: if you ever…

Looks awesome; will consider using this in the future. One note: it would be nice if you explicitly stated, in the LICENSE file or the readme, that this is under the MIT license. It'd make it easier to use this at companies (like mine) where open source packages can only be used if their license is on a legal-department-approved whitelist.

What other licenses are usually on that list?

Re: Google's phone number handling library

#40
post #27

Is there such a thing as an address library? I imagine something with a standard format, and a table schema you can just put into any app and have a functioning contacts list. Preferably a ruby gem maybe?

Having worked on that a bit (I wrote the schema for planning applications in Scotland) ... that stuff is a mess. Take a read of this for starters: http://www.mjt.me.uk/posts/falsehoods-programmers-believe-ab... The requirements for the work I did meant that we had to support the UK's NLPG standard for addresses which didn't even work for the house I live in so I knew I was off to a bad start :)

That is a very good list. I would also add to this list that unlike what people think, numbers are not necessary following each other (they can be completely random), the even/odd rule might also not be respected and the building number can also contain letters.
Post reply on HN