clock

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Zero = Make(0, 0, 0)

Functions

This section is empty.

Types

type Clock

type Clock struct {
	// contains filtered or unexported fields
}

func FromTime

func FromTime(t time.Time) Clock

func Make

func Make(hour, minute, second int) Clock

func MustParse

func MustParse(s string) Clock

func Now

func Now() Clock

func Parse

func Parse(s string) (Clock, error)

func (Clock) Add

func (c Clock) Add(d time.Duration) Clock

func (Clock) After

func (c Clock) After(oc Clock) bool

func (Clock) Before

func (c Clock) Before(oc Clock) bool

func (Clock) Format

func (c Clock) Format() string

func (Clock) FormatInLayout

func (c Clock) FormatInLayout(layout string) string

func (Clock) Hour

func (c Clock) Hour() int

func (Clock) IsZero

func (c Clock) IsZero() bool

func (Clock) MarshalJSON

func (c Clock) MarshalJSON() ([]byte, error)

func (Clock) Minute

func (c Clock) Minute() int

func (Clock) Second

func (c Clock) Second() int

func (Clock) String

func (c Clock) String() string

func (Clock) Sub

func (c Clock) Sub(oc Clock) time.Duration

func (Clock) Time

func (c Clock) Time() time.Time

func (Clock) TimeAt

func (c Clock) TimeAt(d date.Date, loc *time.Location) time.Time

func (*Clock) UnmarshalJSON

func (c *Clock) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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