Documentation
¶
Overview ¶
Package util provides small shared helpers: date parsing and date-range validation.
Index ¶
Constants ¶
View Source
const MaxDateRangeDays = 93
MaxDateRangeDays is the default maximum span accepted by DateRange.Validate.
Variables ¶
Functions ¶
func ParseSundayDate ¶ added in v1.3.15
ParseSundayDate parses value in "2006-01-02" format and verifies it falls on a Sunday, returning ErrNotSunday otherwise.
func ValidateDateRange ¶ added in v1.3.19
ValidateDateRange checks that from precedes to and the span does not exceed maxDays.
func ValidateSunday ¶
ValidateSunday reports whether value is a valid "2006-01-02" date falling on a Sunday.
Types ¶
Click to show internal directories.
Click to hide internal directories.