Module: Edtf::Humanize::Language::Default::Set

Extended by:
Set
Includes:
Formats
Included in:
Set
Defined in:
lib/edtf/humanize/language/default/set.rb

Instance Method Summary collapse

Instance Method Details

#humanizer(date) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/edtf/humanize/language/default/set.rb', line 12

def humanizer(date)
  format_set_entries(date).to_sentence(
    words_connector:
      I18n.t("edtf.terms.set_dates_connector_#{mode(date)}",
             default: ', '),
    last_word_connector:
      I18n.t("edtf.terms.set_last_date_connector_#{mode(date)}",
             default: default_word_connector(date)),
    two_words_connector:
      I18n.t("edtf.terms.set_two_dates_connector_#{mode(date)}",
             default: default_word_connector(date))
  )
end