timezone

package
v2.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Port of java/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java.

Index

Constants

View Source
const Unknown = "Etc/Unknown"

Unknown is the value returned for a prefix that maps to no timezone, defined by ICU as the unknown time zone. It corresponds to upstream's PhoneNumberToTimeZonesMapper.getUnknownTimeZone(), exposed here as a const rather than a function.

Variables

This section is empty.

Functions

func GetTimeZonesForGeographicalNumber

func GetTimeZonesForGeographicalNumber(number *phonenumbers.PhoneNumber) ([]string, error)

GetTimeZonesForGeographicalNumber returns the names of the timezones to which the given geographical number maps, resolved from its full digits.

func GetTimeZonesForNumber

func GetTimeZonesForNumber(number *phonenumbers.PhoneNumber) ([]string, error)

GetTimeZonesForNumber returns the names of the timezones to which the given number maps. An unknown-type number maps to the unknown timezone; a non-geographical number is resolved at the country-calling-code level; any other number is resolved from its full digits.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL