util

package
v1.3.19 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MaxDateRangeDays = 93

Variables

View Source
var (
	ErrNotSunday         = errors.New("date must be a Sunday")
	ErrFromAfterTo       = errors.New("'from' must be before 'to'")
	ErrDateRangeExceeded = errors.New("date range exceeded")
)

Functions

func ParseSundayDate added in v1.3.15

func ParseSundayDate(value string) (time.Time, error)

func ValidateDateRange added in v1.3.19

func ValidateDateRange(from, to time.Time, maxDays int) error

func ValidateSunday

func ValidateSunday(value string) error

Types

type DateRange added in v1.3.19

type DateRange struct {
	From    time.Time
	To      time.Time
	MaxDays int
}

func (DateRange) Validate added in v1.3.19

func (dr DateRange) Validate() error

Jump to

Keyboard shortcuts

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