mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-21 16:58:08 +08:00
modify readme example code
This commit is contained in:
parent
09a3650c97
commit
79dbb41c27
@ -755,7 +755,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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user