org.opentripplanner.api.mapping.ServiceDateMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.api.mapping;
import org.opentripplanner.model.calendar.ServiceDate;
public class ServiceDateMapper {
/**
* Map a ServiceDate to the ISO 8601 standard YYYY-MM-DD.
* If the given input date is {@code null} or unbounded then {@code null}
* is returned.
*/
public static String mapToApi(ServiceDate date) {
return (date == null || date.isMinMax()) ? null : date.asISO8601();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy