[ create a new paste ] login | about

Link: http://codepad.org/tyfkefPd    [ raw code | output | fork ]

Ruby, pasted on Sep 18:
1
2
3
4
5
6
7
8
9
10
11
12
time = Time.now.to_s
hour = time.split(' ')[3]
hour = hour.split(':')[0].to_i
if time =~ /sat|sun/i
  puts "No need to rush for breakfast today, your choice..."
else
  if hour > 7
    puts "It's past 7am, I should pick up the food today."
  else
    puts "It isn't even 7am yet, I could go out for some food."
  end
end


Output:
1
It's past 7am, I should pick up the food today.


Create a new paste based on this one


Comments: