datetime

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: Apache-2.0, BSD-3-Clause, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTimeComponents

func ExtractTimeComponents(duration time.Duration) (days, hours, minutes, seconds, microseconds int64)

ExtractTimeComponents extracts number of days, hours, minutes, seconds, microseconds from duration

func TryParseAsTime added in v2.13.0

func TryParseAsTime(value interface{}, formats []string) (time.Time, bool)

TryParseAsTime attempts to parse the provided value as a time using one of the given formats.

The function iterates over the provided formats and tries to parse the value into a time.Time object. It returns the parsed time and a boolean indicating whether the parsing was successful.

Types

This section is empty.

Jump to

Keyboard shortcuts

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