ts

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultTimeZone = TZAsiaJakarta
)

Functions

func Now

func Now() time.Time

func NowPtr

func NowPtr() *time.Time

func NowWithTZ

func NowWithTZ(zone TimeZone) time.Time

func NowWithTZPtr

func NowWithTZPtr(zone TimeZone) *time.Time

Types

type Manager

type Manager interface {
	Renew() Manager
	Now() time.Time
	NowPtr() *time.Time
	Get() time.Time
	GetPtr() *time.Time
	GetLocation() *time.Location
}

func New

func New(opts ...Option) Manager

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithCustomTimeZone

func WithCustomTimeZone(v TimeZone) Option

type TimeZone

type TimeZone string
const (
	TZAsiaJakarta TimeZone = "Asia/Jakarta"
)

func (TimeZone) String

func (t TimeZone) String() string

Jump to

Keyboard shortcuts

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