diff --git a/lib/arclight/normalized_date.rb b/lib/arclight/normalized_date.rb index f1ce3f174..e1a2cf111 100644 --- a/lib/arclight/normalized_date.rb +++ b/lib/arclight/normalized_date.rb @@ -39,16 +39,11 @@ def year_range(date_array) # @see http://www2.archivists.org/standards/DACS/part_I/chapter_2/4_date for rules def normalize - if inclusive.present? - result = inclusive.to_s - result << ", bulk #{bulk}" if bulk.present? - elsif other.present? - result = other.to_s - else - result = nil - end - - result&.strip + result = [] + result << inclusive if inclusive.present? + result << other if other.present? + result << "bulk #{bulk}" if bulk.present? + result.compact.map(&:strip).join(', ') end end end diff --git a/spec/fixtures/ead/nlm/alphaomegaalpha.xml b/spec/fixtures/ead/nlm/alphaomegaalpha.xml index 7f9b5fb25..abaf354f4 100644 --- a/spec/fixtures/ead/nlm/alphaomegaalpha.xml +++ b/spec/fixtures/ead/nlm/alphaomegaalpha.xml @@ -409,7 +409,8 @@ "A brief account of the origin of the Alpha Omega Alpha Honorary Fraternity" - William W. Root, - n.d. + ca. 1967 + n.d. 1