timeh

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package timeh provides some time-related constants and helper function for system package time.

Index

Constants

View Source
const (
	MonthsInYear = 12
	HoursInDay   = 24
	MinsInHour   = 60
	SecsInMin    = 60

	MinsInDay  = MinsInHour * HoursInDay
	SecsInDay  = SecsInMin * MinsInDay
	SecsInHour = SecsInMin * MinsInHour

	MillisecsInSec = 1e3
	MicrosecsInSec = 1e6
	NanosecsInSec  = 1e9
	PicosecsInSec  = 1e12

	MicrosecsInMillisec = 1e3
	NanosecsInMillisec  = 1e6
	PicosecsInMillisec  = 1e9

	NanosecsInMicrosec = 1e3
	PicosecsInMicrosec = 1e6

	PicosecsInNanosec = 1e3
)

Constants defines correlation between different time units.

View Source
const (
	DaysInMonth = 30
)

Approximate time constants.

View Source
const SimpleLayout = "2006-01-02 15:04:05"

SimpleLayout is additional predefined layout for use in Time.Format and Time.Parse. The reference time used in the layouts is the specific time: "Mon Jan 2 15:04:05 MST 2006".

Variables

This section is empty.

Functions

func UnixEpoch

func UnixEpoch() time.Time

UnixEpoch returns local Time corresponding to the beginning of UNIX epoch.

Types

This section is empty.

Jump to

Keyboard shortcuts

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