hour

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hour

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

func Date

func Date(year int, month time.Month, day, hour int) Hour

func FromTime added in v0.1.1

func FromTime(t time.Time) Hour

func NewHourFromPersistencePrefix

func NewHourFromPersistencePrefix(p persistence.Prefix) (Hour, bool)

func Now

func Now() Hour

func (Hour) Add

func (h Hour) Add(i int) Hour

func (Hour) Before

func (h Hour) Before(h2 Hour) bool

func (Hour) ISO8601

func (h Hour) ISO8601() string

func (Hour) IsBetween

func (h Hour) IsBetween(startOpt *Hour, end Hour) bool

IsBetween is inclusive

func (Hour) MarshalJSON

func (h Hour) MarshalJSON() ([]byte, error)

func (Hour) PersistencePrefix

func (h Hour) PersistencePrefix() persistence.Prefix

func (Hour) String

func (h Hour) String() string

func (Hour) Sub

func (h Hour) Sub(h2 Hour) int

func (*Hour) UnmarshalJSON

func (h *Hour) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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