掲示板

Breaking us phone numbers into parts

thumbnail
10年前 に Dave Weitzel によって更新されました。

Breaking us phone numbers into parts

Regular Member 投稿: 208 参加年月日: 09/11/18 最新の投稿
Is there any easy way of retrieving the three parts of a 10 digit US phone number?
Paypal requires the phone number t be sent as three separate parts when a USA number but I cannot work out how to do this from the lIferay API and use of phoneNumberFormats. For instance will liferay always store as (123)-456-7890 if 10 digits provided or 456-7890 if only 7?
If so I can easily process those strings!
thumbnail
10年前 に Ahmed Hasan によって更新されました。

RE: Breaking us phone numbers into parts

Expert 投稿: 306 参加年月日: 07/04/13 最新の投稿
Hi Dave,

I feel this is nothing to do with Liferay. You can split the string that is stored in the database as 10 digits and show them on the front-end the way you want using NumberFormat utility.

Yours truly,
Ahamed Hasan
Author, Liferay Portlet Cookbook
thumbnail
10年前 に Jack Bakker によって更新されました。

RE: Breaking us phone numbers into parts

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
you might like this http://code.google.com/p/libphonenumber/