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 that the range, counting both ends, spans at most maxDays days. to may be the last day's midnight or its last instant.
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.