moon

package module
v0.6.35 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 6 Imported by: 1

README

moon

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDuration

func FormatDuration(d time.Duration) string

func FormatDurationDays

func FormatDurationDays(d time.Duration) string

func FormatDurationMs

func FormatDurationMs(d time.Duration) string

func FormatTime

func FormatTime(t time.Time) string

func TimezoneLocation added in v0.2.87

func TimezoneLocation(s string) (*time.Location, error)

func WaitInterrupt

func WaitInterrupt() os.Signal

Types

type Time

type Time struct {
	Hours        int
	Minutes      int
	Seconds      int
	Milliseconds int
}

func DurationToTime

func DurationToTime(d time.Duration) Time

func NewTime

func NewTime() *Time

func Now

func Now() *Time

func (Time) Days

func (o Time) Days() (days, hours int)

func (Time) Format

func (o Time) Format() string

func (Time) FormatDays

func (o Time) FormatDays() string

func (Time) FormatMs

func (o Time) FormatMs() string

func (*Time) SetDailyHours

func (o *Time) SetDailyHours(h int)

func (*Time) SetMinutes

func (o *Time) SetMinutes(m int)

func (*Time) SetNow

func (o *Time) SetNow() *Time

func (*Time) SetSeconds

func (o *Time) SetSeconds(s int)

func (*Time) SetTime

func (o *Time) SetTime(t time.Time) *Time

func (Time) TotalMinutes

func (o Time) TotalMinutes() int

func (Time) TotalSeconds

func (o Time) TotalSeconds() int

type Void added in v0.2.16

type Void struct{}

Jump to

Keyboard shortcuts

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