class ActionView::Helpers::DateTimeSelector

def build_day_options(selected)

..."

=> "
build_day_options(2)

If use_two_digit_numbers: true option is passed to DateTimeSelector

..."

=> "
build_day_options(2)

If day_format: ->(day) { day.ordinalize } option is passed to DateTimeSelector

..."

=> "
build_day_options(2)

Build select option HTML for day.
def build_day_options(selected)
  select_options = []
  (1..31).each do |value|
    tag_options = { value: value }
    tag_options[:selected] = "selected" if selected == value
    text = day_name(value)
    select_options << content_tag("option", text, tag_options)
  end
  (select_options.join("\n") + "\n").html_safe
end