modify readme example code

This commit is contained in:
shao 2019-06-25 14:32:20 +08:00
parent 09a3650c97
commit 79dbb41c27

View File

@ -755,7 +755,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
}
}