in app/com/gu/floodgate/reindex/DateParameters.scala [14:22]
def apply(from: Option[String], to: Option[String]): Either[CustomError, DateParameters] = {
val fromDate = Try(from map parseDateTime)
val toDate = Try(to map parseDateTime)
(fromDate, toDate) match {
case (Success(f), Success(t)) => Right(DateParameters(f, t))
case _ => Left(InvalidDateTimeParameter(s"Date parameter provided is invalid."))
}
}