time

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package time provides simple time helper functions

Index

Constants

This section is empty.

Variables

View Source
var (
	// MediaEpoch provides a time object for midnight, January 1, 1904
	MediaEpoch = time.Date(1904, time.January, 1, 0, 0, 0, 0, time.UTC)
)

Functions

func Age

func Age(other time.Time) (result string)

Age calculates the elapse time in days from a time.Time object

func Float64Sec

func Float64Sec(duration time.Duration) float64

Float64Sec converts a duration into a float64 seconds without loosing precision

func FromIntSec

func FromIntSec(sec int) time.Duration

FromIntSec converts the given integer in seconds to a time.Duration

func MediaTime

func MediaTime(sec uint64) (result time.Time, err error)

MediaTime calculates the time given the elapse in seconds since MediaEpoch

Types

This section is empty.

Jump to

Keyboard shortcuts

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