sinaatalay / rendercv

The engine of the RenderCV App
http://docs.rendercv.com
MIT License
1.75k stars 116 forks source link

North American Phone number format #130

Closed prabhjotsbhatia-ca closed 1 month ago

prabhjotsbhatia-ca commented 1 month ago

A clear and concise description of what you want to happen. Please add support for North American Phone number format. North American phone numbers are usually written in one of the following formats: (123) 234-5678 123-234-5678

Other less commonly used formats are: 123 234 5678 123.234.5678

The format being mandated right now is +1-123-456-7890, which nobody would write in North America.

In general too, the country code would be less likely to be written on a resume since one would usually have a local number in the geography they're applying for.

sinaatalay commented 1 month ago

Thank you.

I have added a new option to the data model: locale_catalog.phone_number_format

It's set to national by default, which formats the phone number exactly how you would like. It looks at the country code and formats accordingly, using the Python port of Google's libphonenumber, phonenumbers.

prabhjotsbhatia-ca commented 1 month ago

Thank you. I tested it out and it looks great!

sinaatalay commented 1 month ago

The new functionality is released with v1.13.