Help us shape the future of Go! Take the 2026 Go Developer Survey

domain

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTransactionIDRange

func CheckTransactionIDRange(id1 TransactionID, id2 TransactionID) error

func GetTimeShortcut

func GetTimeShortcut(shortcut string) (time.Time, time.Time, error)

func GetTimeShortcutAsRange

func GetTimeShortcutAsRange(shortcut string) (time.Time, time.Time, error)

func GetTimeShortcutAsSingle

func GetTimeShortcutAsSingle(shortcut string) (time.Time, error)

func IsPeriod

func IsPeriod(s string) bool

IsPeriod reports whether s is a supported period identifier.

func IsTimeShortcut

func IsTimeShortcut(shortcut string) bool

func ShortcutApril

func ShortcutApril() (time.Time, time.Time)

func ShortcutAugust

func ShortcutAugust() (time.Time, time.Time)

func ShortcutDecember

func ShortcutDecember() (time.Time, time.Time)

func ShortcutFebruary

func ShortcutFebruary() (time.Time, time.Time)

func ShortcutFriday

func ShortcutFriday() (time.Time, time.Time)

func ShortcutJanuary

func ShortcutJanuary() (time.Time, time.Time)

func ShortcutJuly

func ShortcutJuly() (time.Time, time.Time)

func ShortcutJune

func ShortcutJune() (time.Time, time.Time)

func ShortcutLastMonth

func ShortcutLastMonth() (time.Time, time.Time)

func ShortcutLastWeek

func ShortcutLastWeek() (time.Time, time.Time)

func ShortcutLastYear

func ShortcutLastYear() (time.Time, time.Time)

func ShortcutMarch

func ShortcutMarch() (time.Time, time.Time)

func ShortcutMay

func ShortcutMay() (time.Time, time.Time)

func ShortcutMonday

func ShortcutMonday() (time.Time, time.Time)

func ShortcutMonth

func ShortcutMonth() (time.Time, time.Time)

func ShortcutNamedMonth

func ShortcutNamedMonth(name string) (time.Time, time.Time)

func ShortcutNovember

func ShortcutNovember() (time.Time, time.Time)

func ShortcutOctober

func ShortcutOctober() (time.Time, time.Time)

func ShortcutSaturday

func ShortcutSaturday() (time.Time, time.Time)

func ShortcutSeptember

func ShortcutSeptember() (time.Time, time.Time)

func ShortcutSunday

func ShortcutSunday() (time.Time, time.Time)

func ShortcutThursday

func ShortcutThursday() (time.Time, time.Time)

func ShortcutToday

func ShortcutToday() (time.Time, time.Time)

func ShortcutTuesday

func ShortcutTuesday() (time.Time, time.Time)

func ShortcutWednesday

func ShortcutWednesday() (time.Time, time.Time)

func ShortcutWeek

func ShortcutWeek() (time.Time, time.Time)

func ShortcutYear

func ShortcutYear() (time.Time, time.Time)

func ShortcutYesterday

func ShortcutYesterday() (time.Time, time.Time)

Types

type PeriodKind

type PeriodKind int

PeriodKind identifies a predefined relative period used in filters.

const (
	// PeriodToday matches entries from the current day.
	PeriodToday PeriodKind = iota
	// PeriodYesterday matches entries from the previous day.
	PeriodYesterday
	// PeriodWeek matches entries from the current week.
	PeriodWeek
	// PeriodLastWeek matches entries from the previous week.
	PeriodLastWeek
	// PeriodMonth matches entries from the current month.
	PeriodMonth
	// PeriodLastMonth matches entries from the previous month.
	PeriodLastMonth
	// PeriodYear matches entries from the current year.
	PeriodYear
	// PeriodLastYear matches entries from the previous year.
	PeriodLastYear
	// PeriodMonday matches entries from last Monday.
	PeriodMonday
	// PeriodTuesday matches entries from last Tuesday.
	PeriodTuesday
	// PeriodWednesday matches entries from last Wednesday.
	PeriodWednesday
	// PeriodThursday matches entries from last Thursday.
	PeriodThursday
	// PeriodFriday matches entries from last Friday.
	PeriodFriday
	// PeriodSaturday matches entries from last Saturday.
	PeriodSaturday
	// PeriodSunday matches entries from last Sunday.
	PeriodSunday
	// PeriodJanuary matches entries from January.
	PeriodJanuary
	// PeriodFebruary matches entries from February.
	PeriodFebruary
	// PeriodMarch matches entries from March.
	PeriodMarch
	// PeriodApril matches entries from April.
	PeriodApril
	// PeriodMay matches entries from May.
	PeriodMay
	// PeriodJune matches entries from June.
	PeriodJune
	// PeriodJuly matches entries from July.
	PeriodJuly
	// PeriodAugust matches entries from August.
	PeriodAugust
	// PeriodSeptember matches entries from September.
	PeriodSeptember
	// PeriodOctober matches entries from October.
	PeriodOctober
	// PeriodNovember matches entries from November.
	PeriodNovember
	// PeriodDecember matches entries from December.
	PeriodDecember
	// PeriodNumberedYear matches entries from the current year.
	PeriodNumberedYear
	// PeriodNumberedMonth matches entries from the current month.
	PeriodNumberedMonth
	// PeriodNumberedWeek matches entries from the current week.
	PeriodNumberedWeek
	// PeriodNumberedDay matches entries from the current day.
	PeriodNumberedDay
)

func ParsePeriod

func ParsePeriod(s string) (PeriodKind, error)

ParsePeriod converts a period identifier (for example, "today") into PeriodKind.

func (PeriodKind) String

func (p PeriodKind) String() string

String returns the canonical identifier for the period kind.

type TransactionID

type TransactionID struct {
	Year  int
	Month int
	Num   int
}

TransactionID is the public transaction identifier split into typed parts.

func CurrentTransactionID

func CurrentTransactionID(num int) TransactionID

func ParseTransactionID

func ParseTransactionID(s string) (TransactionID, error)

ParseTransactionID parses a transaction ID in the form YYYY.MM.NN.

func (TransactionID) Equal

func (t TransactionID) Equal(other TransactionID) bool

func (TransactionID) String

func (t TransactionID) String() string

String returns the compact string form of the transaction ID.

Jump to

Keyboard shortcuts

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