Skip to content

Instantly share code, notes, and snippets.

@jamescook
Created October 19, 2011 14:35
Show Gist options
  • Save jamescook/1298476 to your computer and use it in GitHub Desktop.
Save jamescook/1298476 to your computer and use it in GitHub Desktop.
time = Time.now
(time.beginning_of_day.to_i..time.end_of_day.to_i).step(1800).each do|time|
puts Time.at(time).strftime("%H:%M %p")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment