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: ? 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

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