Skip to content

Instantly share code, notes, and snippets.

@foucist
Last active May 3, 2016 00:55
Show Gist options
  • Save foucist/10cf078e0c83eca12e50 to your computer and use it in GitHub Desktop.
Save foucist/10cf078e0c83eca12e50 to your computer and use it in GitHub Desktop.
generate table of times
- days = 0..7
- hours = 8..18
%table
- days.each do |d|
%th= (Time.now + d.day).strftime("%A")
- hours.each do |h|
%tr
- days.each do |d|
%td= Time.parse("0001-01-01 #{h}:00:00 UTC").strftime '%l %p'
Tuesday Wednesday Thursday Friday Saturday Sunday Monday Tuesday
8 AM 8 AM 8 AM 8 AM 8 AM 8 AM 8 AM 8 AM
9 AM 9 AM 9 AM 9 AM 9 AM 9 AM 9 AM 9 AM
10 AM 10 AM 10 AM 10 AM 10 AM 10 AM 10 AM 10 AM
11 AM 11 AM 11 AM 11 AM 11 AM 11 AM 11 AM 11 AM
12 PM 12 PM 12 PM 12 PM 12 PM 12 PM 12 PM 12 PM
1 PM 1 PM 1 PM 1 PM 1 PM 1 PM 1 PM 1 PM
2 PM 2 PM 2 PM 2 PM 2 PM 2 PM 2 PM 2 PM
3 PM 3 PM 3 PM 3 PM 3 PM 3 PM 3 PM 3 PM
4 PM 4 PM 4 PM 4 PM 4 PM 4 PM 4 PM 4 PM
5 PM 5 PM 5 PM 5 PM 5 PM 5 PM 5 PM 5 PM
6 PM 6 PM 6 PM 6 PM 6 PM 6 PM 6 PM 6 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment