moretime

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: AGPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Day = 24 * time.Hour
View Source
const HalfYear = 6 * Month
View Source
const Month = 30 * Day
View Source
const Quarter = 3 * Month
View Source
const Week = 7 * Day
View Source
const Year = 365 * Day

Variables

This section is empty.

Functions

func ConvertFromFancyTime

func ConvertFromFancyTime(fancy string) time.Duration

Converts the following to time.Duration:

"1y" -> 1 year,
"2M" -> 2 months,
"3w" -> 3 weeks,
"4d" -> 4 days,
"5h" -> 5 hours,
"6m" -> 6 minutes,
"7s" -> 7 seconds,
"8"-> 8 milliseconds

func ConvertToFancyTime

func ConvertToFancyTime(d time.Duration) string

Converts to milliseconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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