Skip to content

Instantly share code, notes, and snippets.

@dfenjves
Created March 3, 2014 02:35
Show Gist options
  • Save dfenjves/9317564 to your computer and use it in GitHub Desktop.
Save dfenjves/9317564 to your computer and use it in GitHub Desktop.
opening_string = week_hash[day].split(" - ")[0]
t = Time.new(2000,1,1,(opening_string[0..1].to_i),(opening_string[3..4].to_i))
@open = t.strftime("%H:%M")
closing_string = week_hash[day].split(" - ")[1]
p = Time.new(2000,1,1,(closing_string[0..1].to_i+12),(closing_string[3..4].to_i))
@close = p.strftime("%H:%M")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment