diff --git a/lib/dotcom_web/components/trip_planner/itinerary_summary.ex b/lib/dotcom_web/components/trip_planner/itinerary_summary.ex index 694135a1d4..dd9c505b1c 100644 --- a/lib/dotcom_web/components/trip_planner/itinerary_summary.ex +++ b/lib/dotcom_web/components/trip_planner/itinerary_summary.ex @@ -51,11 +51,11 @@ defmodule DotcomWeb.Components.TripPlanner.ItinerarySummary do attr(:routes, :list, required: true, doc: "List of %Routes.Route{}") attr(:walk_minutes, :integer, required: true) - # No routes + # No routes: this is a walking leg defp leg_icon(%{routes: [], walk_minutes: _} = assigns) do ~H""" <.icon name="person-walking" class="h-4 w-4" /> diff --git a/lib/dotcom_web/components/trip_planner/results.ex b/lib/dotcom_web/components/trip_planner/results.ex index c8a1179f12..4b16ac62d4 100644 --- a/lib/dotcom_web/components/trip_planner/results.ex +++ b/lib/dotcom_web/components/trip_planner/results.ex @@ -42,6 +42,8 @@ defmodule DotcomWeb.Components.TripPlanner.Results do
0} class="grow text-sm text-grey-dark"> - Similar trips depart at {Enum.map( + Similar {if(Enum.count(summary.next_starts) == 1, + do: "trip departs", + else: "trips depart" + )} at {Enum.map( summary.next_starts, &Timex.format!(&1, "%-I:%M", :strftime) ) diff --git a/lib/dotcom_web/components/trip_planner/results_summary.ex b/lib/dotcom_web/components/trip_planner/results_summary.ex index 8ab42e8acd..630de8de6e 100644 --- a/lib/dotcom_web/components/trip_planner/results_summary.ex +++ b/lib/dotcom_web/components/trip_planner/results_summary.ex @@ -56,7 +56,7 @@ defmodule DotcomWeb.Components.TripPlanner.ResultsSummary do defp time_summary(%{datetime: datetime, datetime_type: datetime_type}) do preamble = if datetime_type == "arrive_by", do: "Arriving by ", else: "Leaving at " time_description = Timex.format!(datetime, "{h12}:{m}{am}") - date_description = Timex.format!(datetime, "{WDfull}, {Mfull} {D}") - preamble <> time_description <> " on " <> date_description + date_description = Timex.format!(datetime, "{WDfull}, {Mfull} ") + preamble <> time_description <> " on " <> date_description <> Inflex.ordinalize(datetime.day) end end