timehelpers

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

README

timeHelpers

timeHelpers provides timezone inference from locale region codes.

Functions

Function Description
InferTimezoneFromLocale(locale string) (string, error) Maps a locale string (e.g. "en_GB") to an IANA timezone name

Example

import "github.com/mt1976/frantic-core/timeHelpers"

func main() {
    tz, err := timeHelpers.InferTimezoneFromLocale("en_GB")
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println("Timezone:", tz) // "Europe/London"
}

Documentation

Overview

Package timehelpers contains helpers for time-of-day and duration handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InferTimezoneFromLocale

func InferTimezoneFromLocale(locale string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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