lib/modules/time.rb
# Check what time it is, AM or PM. If it's AM say 'Good morning' else say 'Good afternoon'.
# @return [String]='am' or 'pm'
Check what time it is, AM or PM.
Check what time it is AM or PM .
def check_time
      if Time.now.strftime('%P') == 'pm'
        'Good afternoon'
      else
        'Good morning'
      end
    end
def check_time if Time . now . strftime ( '%P' ) == 'pm' 'Good afternoon' else 'Good morning' end end
Check what time it is, AM or PM.
Check what time it is AM or PM .
None
String