tt

package module
v0.0.0-...-58c603c Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: EUPL-1.2 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityID

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

func NewActivityID

func NewActivityID(raw string) ActivityID

func (ActivityID) Raw

func (id ActivityID) Raw() string

func (ActivityID) String

func (id ActivityID) String() string

type Date

type Date struct {
	Year  int16
	Day   int8
	Month time.Month
}

A Date is a Gregorian calendar date (within a reasonably interesting time-range).

A zero value Date does not represent a valid value.

func DateAt

func DateAt(t time.Time) Date

NewDate returns the Date converting the time t. The returned Date has the same *time.Location as t. When t is the zero-value time NewDate returns the zero-value Date.

func (Date) Add

func (d Date) Add(years, months, days int) Date

func (Date) End

func (d Date) End() time.Time

End time of the date.

func (Date) Start

func (d Date) Start() time.Time

Start time of the date.

func (Date) String

func (d Date) String() string

type Entry

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

func (Entry) ActivityID

func (e Entry) ActivityID() ActivityID

func (Entry) Date

func (e Entry) Date() Date

func (*Entry) Record

func (e *Entry) Record(dt time.Duration)

func (Entry) Recorded

func (e Entry) Recorded() time.Duration

type EntrySet

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

func (*EntrySet) ActivitiesOn

func (set *EntrySet) ActivitiesOn(ds ...Date) iter.Seq[ActivityID]

func (*EntrySet) Allocate

func (set *EntrySet) Allocate(date Date, dt time.Duration, ids []ActivityID)

func (*EntrySet) AllocateProportionally

func (set *EntrySet) AllocateProportionally(date Date, dt time.Duration, ids []ActivityID)

func (*EntrySet) EntriesOn

func (set *EntrySet) EntriesOn(ds ...Date) iter.Seq[*Entry]

func (*EntrySet) Entry

func (set *EntrySet) Entry(id ActivityID, date Date) *Entry

func (*EntrySet) GC

func (set *EntrySet) GC(firstKept Date)

func (*EntrySet) ReadFrom

func (set *EntrySet) ReadFrom(r io.Reader) (_ int64, err error)

func (*EntrySet) Sum

func (set *EntrySet) Sum(ds ...Date) time.Duration

func (*EntrySet) WriteTo

func (set *EntrySet) WriteTo(w io.Writer) (_ int64, err error)

Directories

Path Synopsis
cmd
tt command

Jump to

Keyboard shortcuts

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