public class PhoneNumberToTimeZonesMapper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static PhoneNumberToTimeZonesMapper |
getInstance()
Gets a
PhoneNumberToTimeZonesMapper instance. |
java.util.List<java.lang.String> |
getTimeZonesForGeographicalNumber(Phonenumber.PhoneNumber number)
Returns a list of time zones to which a phone number belongs.
|
java.util.List<java.lang.String> |
getTimeZonesForNumber(Phonenumber.PhoneNumber number)
As per
#getTimeZonesForGeographicalNumber(PhoneNumber) but explicitly checks
the validity of the number passed in. |
static java.lang.String |
getUnknownTimeZone()
Returns a String with the ICU unknown time zone.
|
public static PhoneNumberToTimeZonesMapper getInstance()
PhoneNumberToTimeZonesMapper instance.
The PhoneNumberToTimeZonesMapper is implemented as a singleton. Therefore, calling
this method multiple times will only result in one instance being created.
PhoneNumberToTimeZonesMapper instancepublic java.util.List<java.lang.String> getTimeZonesForGeographicalNumber(Phonenumber.PhoneNumber number)
This method assumes the validity of the number passed in has already been checked, and that the number is geo-localizable. We consider fixed-line and mobile numbers possible candidates for geo-localization.
number - a valid phone number for which we want to get the time zones to which it belongspublic java.util.List<java.lang.String> getTimeZonesForNumber(Phonenumber.PhoneNumber number)
#getTimeZonesForGeographicalNumber(PhoneNumber) but explicitly checks
the validity of the number passed in.number - the phone number for which we want to get the time zones to which it belongspublic static java.lang.String getUnknownTimeZone()
Copyright © 2017 Google. All Rights Reserved.