Is it better to store telephone numbers in some canonical format or “as entered”?

前端 未结 12 1514
鱼传尺愫
鱼传尺愫 2020-12-11 00:59

Storing a telehone number in some kind of canonical format has several advantages from a programmers point of view, but it might confuse the user, if sudde

12条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-11 01:58

    Useful resources:

    List of UK area codes: http://www.telephonenumbers.co.uk/Telephone-Area-Codes-UK/i=2 (dated July 2011).

    List of number lengths/number formats for the UK (covers 01 and 02 numbers): http://www.aa-asterisk.org.uk/index.php/01_numbers

    Allocations in "Mixed" areas: http://www.aa-asterisk.org.uk/index.php/Mixed_areas

    Allocations in "ELNS" areas: http://www.aa-asterisk.org.uk/index.php/ELNS_areas

    UK prefix list with formatting information: http://www.aa-asterisk.org.uk/index.php/Sabc.txt

    Formatting UK numbers is certainly a LOT more complex than (01234) 567890, (0141) 234 5678 and (020) 3456 7890.

提交回复
热议问题