~ihabunek/triglav

76b0a9cca5c198959f0b86022b442bcbe7ab2779 — Ivan Habunek 1 year, 8 months ago c4efe69
Allow empty dates
1 files changed, 5 insertions(+), 3 deletions(-)

M lib/triglav/public_transport/import_gtfs.ex
M lib/triglav/public_transport/import_gtfs.ex => lib/triglav/public_transport/import_gtfs.ex +5 -3
@@ 321,9 321,11 @@ defmodule Triglav.PublicTransport.ImportGtfs do

  # Parse yyyymmdd formatted date
  defp parse_gtfs_date(date) do
    [String.slice(date, 0..3), String.slice(date, 4..5), String.slice(date, 6..7)]
    |> Enum.join("-")
    |> Date.from_iso8601!()
    if date != "" do
      [String.slice(date, 0..3), String.slice(date, 4..5), String.slice(date, 6..7)]
      |> Enum.join("-")
      |> Date.from_iso8601!()
    end
  end

  defp parse_feed_info(path) do