diff --git a/lib/dpul_collections/indexing_pipeline/figgy/hydration_cache_entry.ex b/lib/dpul_collections/indexing_pipeline/figgy/hydration_cache_entry.ex index 88f60412..8628c88e 100644 --- a/lib/dpul_collections/indexing_pipeline/figgy/hydration_cache_entry.ex +++ b/lib/dpul_collections/indexing_pipeline/figgy/hydration_cache_entry.ex @@ -158,7 +158,7 @@ defmodule DpulCollections.IndexingPipeline.Figgy.HydrationCacheEntry do end defp format_date(%{"date_created" => [date | _tail]}) do - extract_year(date) || date + date end defp format_date(%{"date_created" => []}) do diff --git a/test/dpul_collections/indexing_pipeline/figgy/hydration_cache_entry_test.exs b/test/dpul_collections/indexing_pipeline/figgy/hydration_cache_entry_test.exs index f17d9ee5..0d5c0d32 100644 --- a/test/dpul_collections/indexing_pipeline/figgy/hydration_cache_entry_test.exs +++ b/test/dpul_collections/indexing_pipeline/figgy/hydration_cache_entry_test.exs @@ -256,10 +256,10 @@ defmodule DpulCollections.IndexingPipeline.Figgy.HydrationCacheEntryTest do assert doc3[:display_date_s] == nil assert doc4[:display_date_s] == "2011 - 2013 (approximate)" assert doc5[:display_date_s] == nil - assert doc6[:display_date_s] == "1952" - assert doc7[:display_date_s] == "1923" - assert doc8[:display_date_s] == "2010" - assert doc9[:display_date_s] == "1954" + assert doc6[:display_date_s] == "January 26, 1952" + assert doc7[:display_date_s] == "29 Raḥab al-Marjab 1342- رحب المرجب 1342 - [July 1923]" + assert doc8[:display_date_s] == "[2010]" + assert doc9[:display_date_s] == "September [1954]" end test "logs dates it can't parse" do