Skip to content

Releases: TrevorPilley/phone-number-parser

1.4.0

19 Jan 22:27
Compare
Choose a tag to compare

Features

This release adds support for parsing Spain phone numbers.

  • 6, 7, 8 and 9 numbers are supported.
  • 8 and 9 numbers are geographically assigned so the geographic area is included.
  • Sets the IsVirtual property as appropriate for mobile phone numbers.
  • The IsDataOnly and IsPager properties are not currently set for Spain mobile numbers.
  • Sets the IsFreephone property for non-geographical phone numbers which are freephone numbers (e.g. 800 and 900).

It also includes the following enhancement:

#73 - Expand the geographic area for Northern Ireland numbers

Bug fixes

None

API changes

CountryInfo

+ public static CountryInfo ES { get; }

1.3.0

15 Jan 21:31
83bfb74
Compare
Choose a tag to compare

Features

This release adds support for parsing France phone numbers.

  • 01, 02, 03, 04, 05, 06, 07, 08 and 09 numbers are supported.
  • 01, 02, 03, 04 are 05 numbers are geographically assigned so the geographic area is included, although currently this is only within the top level geographic zones (01 Île-de-France, 02 Nord-Ouest, 03 Nord-Est, 04 Sud-Est and 05 Sud-Ouest).
  • The IsDataOnly, IsPager and IsVirtual properties are not currently set for France mobile numbers.
  • Sets the IsFreephone property for non-geographical phone numbers which are freephone numbers (e.g. 0800-0805 numbers).

Bug fixes

None

API changes

CountryInfo

+ public static CountryInfo FR { get; }

1.2.0

14 Jan 13:32
Compare
Choose a tag to compare

Features

This release adds support for parsing Italy phone numbers.

  • 0, 3 and 8 numbers are supported
  • 0 numbers are geographically assigned so the geographic area is included.
  • The IsDataOnly, IsPager and IsVirtual properties are not currently set for Italy mobile numbers.
  • Sets the IsFreephone property for non-geographical phone numbers which are freephone numbers (e.g. 800 and 803).

Bug fixes

None

API changes

CountryInfo

+ public static CountryInfo IT { get; }

1.1.0

11 Jan 15:00
Compare
Choose a tag to compare

Features

This release adds support for parsing Ireland phone numbers.

  • 01, 02, 04, 05, 06, 07, 08 and 09 numbers are supported.
  • 01, 02, 04, 05, 06, 07 (except 0700) and 09 numbers are geographically assigned so the geographic area is included.
  • Sets the IsPager and IsVirtual properties as appropriate for mobile phone numbers.
  • The IsDataOnly property is not currently set for Ireland mobile numbers.
  • Sets the IsFreephone property for non-geographical phone numbers which are freephone numbers (e.g. 0800).

It also contains some internal refactoring to better support additional countries and adds a foundation for specifying parsing options going forward.

Bug fixes

The following bugs were also fixed:

#24 Penrith 5 digit local numbers aren't supported
#38 3xx local numbers can go up to 9999999 not 7999999

API Changes

CountryInfo

The Iso3116Code property was incorrectly named, it should have been Iso3166Code. A new property has been added and Iso3116Code has been marked obsolete.

+ public static CountryInfo IE { get; }
+ public bool HasAreaCodes { get; }
- public string Iso3116Code { get; }
+ public string Iso3166Code { get; }

ParseOptions

This new class allows for specifying options related to parsing phone numbers. Initially this allows control over which of the countries that the library supports being used. For example, it is possible to remove a country via ParseOptions.Default.Countries.Remove(CountryInfo.UK); or create a separate ParseOptions instance for an application which can be used by calling the new Parse overloads on PhoneNumber.

+ public sealed class ParseOptions
+ public static ParseOptions Default { get; }
+ public ICollection<CountryInfo> Countries { get; }

PhoneNumber

New overloads for Parse and TryParse to allow specifying a custom ParseOptions instance.

+ public static PhoneNumber Parse(string value, ParseOptions options)
+ public static PhoneNumber Parse(string value, string countryCode, ParseOptions options)
+ public static bool TryParse(string value, ParseOptions options, out PhoneNumber? phoneNumber)
+ public static bool TryParse(string value, string countryCode, ParseOptions options, out PhoneNumber? phoneNumber)

1.0.1

02 Jan 19:12
21d4124
Compare
Choose a tag to compare

This release fixes 2 bugs:

#6 UK Geographic Phone Number ranges can't start at 000000
#9 Area codes with national dialling only

1.0.0

31 Dec 23:34
Compare
Choose a tag to compare

Initial release of the library with UK phone number support.