time

package module
v0.0.0-...-bae1bac Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 2 Imported by: 0

README

time-go

Alternative time package offering time travel for test

Documentation

Index

Constants

View Source
const (
	Layout      = orig.Layout
	ANSIC       = orig.ANSIC
	UnixDate    = orig.UnixDate
	RubyDate    = orig.RubyDate
	RFC822      = orig.RFC822
	RFC822Z     = orig.RFC822Z
	RFC850      = orig.RFC850
	RFC1123     = orig.RFC1123
	RFC1123Z    = orig.RFC1123Z
	RFC3339     = orig.RFC3339
	RFC3339Nano = orig.RFC3339Nano
	Kitchen     = orig.Kitchen
	Stamp       = orig.Stamp
	StampMilli  = orig.StampMilli
	StampMicro  = orig.StampMicro
	StampNano   = orig.StampNano
	DateTime    = orig.DateTime
	DateOnly    = orig.DateOnly
	TimeOnly    = orig.TimeOnly

	Nanosecond  = orig.Nanosecond
	Microsecond = orig.Microsecond
	Millisecond = orig.Millisecond
	Second      = orig.Second
	Minute      = orig.Minute
	Hour        = orig.Hour

	// Month
	January   = orig.January
	February  = orig.February
	March     = orig.March
	April     = orig.April
	May       = orig.May
	June      = orig.June
	July      = orig.July
	August    = orig.August
	September = orig.September
	October   = orig.October
	November  = orig.November
	December  = orig.December
)

Variables

View Source
var (
	UTC   = orig.UTC
	Local = orig.Local
)
View Source
var (
	After = orig.After
	Sleep = orig.Sleep
	Tick  = orig.Tick

	// Duration
	ParseDuration = orig.ParseDuration
	Since         = orig.Since
	Until         = orig.Until

	// Location
	FixedZone              = orig.FixedZone
	LoadLocation           = orig.LoadLocation
	LoadLocationFromTZData = orig.LoadLocationFromTZData

	// Ticker
	NewTicker = orig.NewTicker

	// Time
	Date = orig.Date
	// Now = orig.Now // replaced in ./now.go
	Parse           = orig.Parse
	ParseInLocation = orig.ParseInLocation
	Unix            = orig.Unix
	UnixMicro       = orig.UnixMicro
	UnixMilli       = orig.UnixMilli

	// Timer
	AfterFunc = orig.AfterFunc
	NewTimer  = orig.NewTimer
)
View Source
var FixedLocation = func() *Location {
	return FixedZone("Asia/Tokyo", 9*60*60)
}()

Functions

This section is empty.

Types

type Duration

type Duration = orig.Duration

type Location

type Location = orig.Location

type Month

type Month = orig.Month

type ParseError

type ParseError = orig.ParseError

type Ticker

type Ticker = orig.Ticker

type Time

type Time = orig.Time

func Now

func Now() Time

func NowWithLocation

func NowWithLocation() Time

func NowWithoutLocation

func NowWithoutLocation() Time

type Timer

type Timer = orig.Timer

type Weekdday

type Weekdday = orig.Weekday

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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