modify readme example code ()

This commit is contained in:
srt180 2019-06-28 09:34:14 +08:00 committed by thinkerou
parent 31342fc03f
commit 46acb91996
1 changed files with 1 additions and 1 deletions

View File

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