Module: Edtf::Humanize::Set

Includes:
Formats
Defined in:
lib/edtf/humanize/set.rb

Instance Method Summary collapse

Instance Method Details

#humanizeObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/edtf/humanize/set.rb', line 7

def humanize
  display = []
  self.entries.each do |date|
    display << "#{apply_if_approximate(date)}#{simple_date_format(date)}"
  end
  display.to_sentence(
    words_connector: Edtf::Humanize.configuration.set_dates_connector,
    last_word_connector: Edtf::Humanize.configuration.set_last_date_connector,
    two_words_connector: Edtf::Humanize.configuration.set_two_dates_connector
    )
end