class ActionView::Helpers::DateTimeSelector

def year_name(number)

year_name(1998) # => "Heisei 10"

If the :year_format option is passed:

year_name(1998) # => 1998

Looks up year names by number.
def year_name(number)
  if year_format_lambda = @options[:year_format]
    year_format_lambda.call(number)
  else
    number
  end
end