Browse Source

Docs update (#1673)

* Updating docs for getRegionCodeForNumber to clarify that it does not work for short codes or invalid numbers.
pull/1155/merge
lararennie 9 years ago
committed by GitHub
parent
commit
14f65e569b
4 changed files with 9 additions and 4 deletions
  1. +2
    -1
      cpp/src/phonenumbers/phonenumberutil.h
  2. +2
    -1
      java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
  3. +2
    -1
      javascript/i18n/phonenumbers/phonenumberutil.js
  4. +3
    -1
      pending_code_changes.txt

+ 2
- 1
cpp/src/phonenumbers/phonenumberutil.h View File

@ -452,7 +452,8 @@ class PhoneNumberUtil : public Singleton<PhoneNumberUtil> {
const string& region_code) const;
// Returns the region where a phone number is from. This could be used for
// geo-coding at the region level.
// geocoding at the region level. Only guarantees correct results for valid,
// full numbers (not short-codes, or invalid numbers).
void GetRegionCodeForNumber(const PhoneNumber& number,
string* region_code) const;


+ 2
- 1
java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java View File

@ -2286,7 +2286,8 @@ public class PhoneNumberUtil {
/**
* Returns the region where a phone number is from. This could be used for geocoding at the region
* level.
* level. Only guarantees correct results for valid, full numbers (not short-codes, or invalid
* numbers).
*
* @param number the phone number whose origin we want to know
* @return the region where the phone number is from, or null if no region matches this calling


+ 2
- 1
javascript/i18n/phonenumbers/phonenumberutil.js View File

@ -3025,7 +3025,8 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.isValidNumberForRegion =
/**
* Returns the region where a phone number is from. This could be used for
* geocoding at the region level.
* geocoding at the region level. Only guarantees correct results for valid,
* full numbers (not short-codes, or invalid numbers).
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number whose origin
* we want to know.


+ 3
- 1
pending_code_changes.txt View File

@ -1 +1,3 @@
Code changes:
- Doc updates for getRegionCodeForNumber to clarify that it does not
work for short-codes or invalid numbers.

Loading…
Cancel
Save