timefilter

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 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 TimeBound

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

TimeBound represents a parsed time filter value that can be either an instant or a date-only value

func (TimeBound) IsEmpty

func (tb TimeBound) IsEmpty() bool

IsEmpty returns true if the TimeBound has no filter criteria

type TimeFilter

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

TimeFilter represents multiple time filtering criteria

func NewTimeFilter

func NewTimeFilter(since, until, maxAge, minAge string, now time.Time, loc *time.Location) (*TimeFilter, error)

NewTimeFilter creates a new TimeFilter with the given parameters

func (*TimeFilter) FormatForDisplay

func (tf *TimeFilter) FormatForDisplay(loc *time.Location) string

FormatForDisplay returns a formatted string showing the active time filters This shows what the program actually parsed and is acting on

func (*TimeFilter) IncludeByTimeFilter

func (tf *TimeFilter) IncludeByTimeFilter(mtime time.Time, loc *time.Location) bool

IncludeByTimeFilter determines if a file should be included based on the complete time filter

func (*TimeFilter) IsEmpty

func (tf *TimeFilter) IsEmpty() bool

IsEmpty returns true if the TimeFilter has no filter criteria

Jump to

Keyboard shortcuts

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