timeutils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(t time.Time, format TimeFormat) string

func FormatByContext

func FormatByContext(c telebot.Context, t time.Time, format TimeFormat) string

Format time to string by context, it extract user timezone from context and format by timezone

Types

type TimeFormat

type TimeFormat string

Time format type

const (
	FormatShort  TimeFormat = "02.01, 15:04"
	FormatMedium TimeFormat = "02.01.06, 15:04"
	FormatFull   TimeFormat = "02.01.06, 15:04 MST" // -07
)

Jump to

Keyboard shortcuts

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