Documentation
¶
Index ¶
- func CheckTransactionIDRange(id1 TransactionID, id2 TransactionID) error
- func GetTimeShortcut(shortcut string) (time.Time, time.Time, error)
- func GetTimeShortcutAsRange(shortcut string) (time.Time, time.Time, error)
- func GetTimeShortcutAsSingle(shortcut string) (time.Time, error)
- func IsPeriod(s string) bool
- func IsTimeShortcut(shortcut string) bool
- func ShortcutApril() (time.Time, time.Time)
- func ShortcutAugust() (time.Time, time.Time)
- func ShortcutDecember() (time.Time, time.Time)
- func ShortcutFebruary() (time.Time, time.Time)
- func ShortcutFriday() (time.Time, time.Time)
- func ShortcutJanuary() (time.Time, time.Time)
- func ShortcutJuly() (time.Time, time.Time)
- func ShortcutJune() (time.Time, time.Time)
- func ShortcutLastMonth() (time.Time, time.Time)
- func ShortcutLastWeek() (time.Time, time.Time)
- func ShortcutLastYear() (time.Time, time.Time)
- func ShortcutMarch() (time.Time, time.Time)
- func ShortcutMay() (time.Time, time.Time)
- func ShortcutMonday() (time.Time, time.Time)
- func ShortcutMonth() (time.Time, time.Time)
- func ShortcutNamedMonth(name string) (time.Time, time.Time)
- func ShortcutNovember() (time.Time, time.Time)
- func ShortcutOctober() (time.Time, time.Time)
- func ShortcutSaturday() (time.Time, time.Time)
- func ShortcutSeptember() (time.Time, time.Time)
- func ShortcutSunday() (time.Time, time.Time)
- func ShortcutThursday() (time.Time, time.Time)
- func ShortcutToday() (time.Time, time.Time)
- func ShortcutTuesday() (time.Time, time.Time)
- func ShortcutWednesday() (time.Time, time.Time)
- func ShortcutWeek() (time.Time, time.Time)
- func ShortcutYear() (time.Time, time.Time)
- func ShortcutYesterday() (time.Time, time.Time)
- type PeriodKind
- type TransactionID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTransactionIDRange ¶
func CheckTransactionIDRange(id1 TransactionID, id2 TransactionID) error
func GetTimeShortcutAsRange ¶
func IsTimeShortcut ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.