title: How to write a program which says "good morning" and "good night"
body: <p>I need to write a program that says "good morning", "good afternoon", "good evening" and "good night" depending on the clock in Ruby.</p>
  
  <p>I tried a program which doesn't work. </p>
  
  <pre><code>def greet(hour_of_clock)
  
  end
  if hour == 6 -11 am
  puts 'good morning'
  
  elsif hour == 12-4 pm
  puts 'good afternoon'
  
  elsif hour == 5-8 pm
  puts 'good evening'
  
  else
  puts 'good night'
  
  end
  local_time = time.new
  hour_of_clock = local_time_hou
  </code></pre>