modify readme example code (#1961)

This commit is contained in:
srt180 2019-06-28 09:34:14 +08:00 committed by thinkerou
parent 31342fc03f
commit 46acb91996

View File

@ -756,7 +756,7 @@ func bookableDate(
) bool {
if date, ok := field.Interface().(time.Time); ok {
today := time.Now()
if today.Year() > date.Year() || today.YearDay() > date.YearDay() {
if today.After(date) {
return false
}
}