I
ilona
Hi all,
I store phone numbers in the database as 123447775665554(input mask is used
for input, and some numbers have extensions), and I also know from db if the
number is Canadian, US, or some other country. When I retrieve the phone
numbers, I need to display them as (###) ###-#### x 99999 if it is a
Canadian number or (###) ###-#### Ext. 99999 if it is US phone number.
Potentially I'd have other countries added as well which might have
completely different formatting. Input Mask and format for output formatting
will be stored in db, per country.
How would you approach formatting the output in this case?
I store phone numbers in the database as 123447775665554(input mask is used
for input, and some numbers have extensions), and I also know from db if the
number is Canadian, US, or some other country. When I retrieve the phone
numbers, I need to display them as (###) ###-#### x 99999 if it is a
Canadian number or (###) ###-#### Ext. 99999 if it is US phone number.
Potentially I'd have other countries added as well which might have
completely different formatting. Input Mask and format for output formatting
will be stored in db, per country.
How would you approach formatting the output in this case?