mapper

package module
v1.0.1-0...-0efffb5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 5 Imported by: 0

README

GoTimeZoneMapper

Maintainability Coverage Status CI Go Report Card

A library to lookup Country-Code (ISO 3166-1 alpha-2) from Timezone (tz database)

Example Lookup

America/New_York => US

How to use

code, err := mapper.FindCountryCodeForTimezone("America/New_York")
if err != nil {
	fmt.Println(err)
}
fmt.Println(code)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCountryCodeForTimezone

func FindCountryCodeForTimezone(timezone string) (string, error)

FindCountryCodeForTimezone : Returns country-code in ISO 3166-1 alpha-2 format (Ex India - IN)

Types

This section is empty.

Jump to

Keyboard shortcuts

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