23 lines
418 B
Go
Raw Normal View History

2018-03-22 21:26:52 +00:00
package filteranime
import (
"time"
"github.com/aerogo/aero"
2019-06-03 09:32:43 +00:00
"github.com/animenotifier/notify.moe/arn"
2019-11-18 06:13:51 +00:00
"github.com/animenotifier/notify.moe/arn/validate"
2018-03-22 21:26:52 +00:00
)
// StartDate ...
2019-06-01 04:55:49 +00:00
func StartDate(ctx aero.Context) error {
2018-03-22 21:26:52 +00:00
return editorList(
ctx,
"Anime without a valid start date",
func(anime *arn.Anime) bool {
2019-11-18 06:13:51 +00:00
_, err := time.Parse(validate.DateFormat, anime.StartDate)
2018-03-22 21:26:52 +00:00
return err != nil
},
nil,
)
}