public LocalDate getCalendarServiceRangeStart ( ) { int startDate = 0 ; for ( Service service : feed . services . values ( ) ) { if ( service . calendar == null ) continue ; // if (startDate == 0 || service.calendar.start_date < startDate) { // startDate = service.calendar.start_date; // } } if ( startDate == 0 ) return null ; DateTimeFormatter formatter = DateTimeFormatter . ofPattern ( "yyyyMMdd" ) ; return LocalDate . parse ( String . valueOf ( startDate ) , formatter ) ; }
returns null for schedules without calendar service schedules