Inside datetime.go in a case of an error the functions returns time.Now()
func decodeYearMonth(value string, c Constraints) (time.Time, error) {
y, err := decodeYearMonthWithoutChecks(value)
if err != nil {
return time.Now(), err
}
This could cause a bug, when the caller of the function does not check the returned error. I would suggest to change the return value to an empty time.Time
Inside datetime.go in a case of an error the functions returns time.Now()
This could cause a bug, when the caller of the function does not check the returned error. I would suggest to change the return value to an empty time.Time