Skip to content

Instantly share code, notes, and snippets.

@xntrik
Created January 16, 2012 06:27
Show Gist options
  • Save xntrik/1619394 to your computer and use it in GitHub Desktop.
Save xntrik/1619394 to your computer and use it in GitHub Desktop.
ruby file to print out a sequence of dates .. laaazy
#!/usr/bin/ruby
require 'date'
sd = Date.parse('2011-06-8')
ed = Date.parse('2011-06-15')
sd.upto(ed) { |date|
(0..23).each do |hour|
printf("%s:%02d\n",date.strftime('%d/%b/%Y'),hour)
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment