Browse Source

modify readme example code (#1961)

srt180 6 years ago
parent
commit
46acb91996
1 changed files with 1 additions and 1 deletions
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -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
 		}
 		}
 	}
 	}