caldur

package
v0.0.0-...-5004fd2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDuration = errors.New("not a valid duration")
)

Functions

func Shift

func Shift(t time.Time, p CalendarDuration) time.Time

Types

type CalendarDuration

type CalendarDuration struct {
	Year   int
	Month  int
	Week   int
	Day    int
	Hour   int
	Minute int
	Second int
}

func Parse

func Parse(s string) (p CalendarDuration, err error)

func (*CalendarDuration) Bytes

func (p *CalendarDuration) Bytes() []byte

func (CalendarDuration) MarshalText

func (p CalendarDuration) MarshalText() (text []byte, err error)

MarshalText implements encoding.TextMarshaler.

func (*CalendarDuration) String

func (p *CalendarDuration) String() string

func (*CalendarDuration) UnmarshalText

func (p *CalendarDuration) UnmarshalText(text []byte) (err error)

UnmarshalText implements encoding.TextUnmarshaler.

Jump to

Keyboard shortcuts

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