Class PhoneNumberToTimeZonesMapper
- Namespace
- PhoneNumbers
- Assembly
- PhoneNumbers.dll
public sealed class PhoneNumberToTimeZonesMapper
- Inheritance
-
PhoneNumberToTimeZonesMapper
- Inherited Members
Methods
GetInstance()
public static PhoneNumberToTimeZonesMapper GetInstance()
Returns
GetTimeZonesForGeographicalNumber(PhoneNumber)
Returns a list of time zones to which a phone number belongs. 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.
param number a valid phone number for which we want to get the time zones to which it belongs return a list of the corresponding time zones or a single element list with the default unknown time zone if no other time zone was found or if the number was invalid
public List<string> GetTimeZonesForGeographicalNumber(PhoneNumber number)
Parameters
numberPhoneNumbera valid phone number for which we want to get the time zones to which it belongs
Returns
- List<string>
a list of the corresponding time zones or a single element list with the default unknown time zone if no other time zone was found or if the number was invalid
GetTimeZonesForNumber(PhoneNumber)
As per GetTimeZonesForGeographicalNumber(PhoneNumber) but explicitly checks the validity of the number passed in.
param number the phone number for which we want to get the time zones to which it belongs return a list of the corresponding time zones or a single element list with the default unknown time zone if no other time zone was found or if the number was invalid
public List<string> GetTimeZonesForNumber(PhoneNumber number)
Parameters
numberPhoneNumberthe phone number for which we want to get the time zones to which it belongs
Returns
- List<string>
a list of the corresponding time zones or a single element list with the default unknown time zone if no other time zone was found or if the number was invalid
GetUnknownTimeZone()
Returns a string with the ICU unknown time zone.
public string GetUnknownTimeZone()