timeutil

package
v0.0.0-...-098be99 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock string

func (Clock) Time

func (c Clock) Time() Time

type Date

type Date string

func (Date) Time

func (d Date) Time() Time

type Datetime

type Datetime string

func (Datetime) Time

func (d Datetime) Time() Time

type Time

type Time struct {
	time.Time
}

func MustParse

func MustParse(text string, layout ...string) Time

func Now

func Now() Time

func Parse

func Parse(text string, layout ...string) (Time, error)

func (Time) ClockFormat

func (t Time) ClockFormat() string

func (Time) DateFormat

func (t Time) DateFormat() string

func (Time) Format

func (t Time) Format(layout ...string) string

func (Time) FormatWithDefault

func (t Time) FormatWithDefault(def string, layout ...string) string

func (*Time) Scan

func (t *Time) Scan(v any) error

func (Time) TodayBegin

func (t Time) TodayBegin() time.Time

func (Time) TodayEnd

func (t Time) TodayEnd() time.Time

func (Time) TodayRange

func (t Time) TodayRange() [2]time.Time

func (Time) Value

func (t Time) Value() (driver.Value, error)

type UnixMic

type UnixMic int64

func (UnixMic) Time

func (u UnixMic) Time() Time

type UnixMil

type UnixMil int64

func (UnixMil) Time

func (u UnixMil) Time() Time

type UnixSec

type UnixSec int64

func (UnixSec) Time

func (u UnixSec) Time() Time

Jump to

Keyboard shortcuts

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