datetime

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationToHMS added in v0.0.8

func DurationToHMS(dur time.Duration) string

func FormatDatetime

func FormatDatetime(dt time.Time) string

FormatDatetime creates an ISO 8601 formatted string based on provided time.

func GetCurrentDatetime

func GetCurrentDatetime() string

GetCurrentDatetime returns current UTC date and time in ISO 8601 date format without timezone info (e.g. 2023-04-13T08:19:03)

func GetCurrentDatetimeIn added in v0.0.5

func GetCurrentDatetimeIn(loc *time.Location) string

GetCurrentDatetimeIn returns current local date and time in ISO 8601 date format without timezone info (e.g. 2023-04-13T08:19:03)

func ParseDuration added in v0.2.3

func ParseDuration(v string) (time.Duration, error)

ParseDuration decodes string-encoded durations like 10s, 17h, 3y, or even '5d 7m

Types

This section is empty.

Jump to

Keyboard shortcuts

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