Skip to content

Instantly share code, notes, and snippets.

@maecha
Last active June 29, 2018 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maecha/f59a96d4e42aa2455aca5de5dfc95a35 to your computer and use it in GitHub Desktop.
Save maecha/f59a96d4e42aa2455aca5de5dfc95a35 to your computer and use it in GitHub Desktop.
Get the increment of time (string), increment 30 mins
def get_hoge_times
48.times.map.each_with_index {|i| (Time.parse('0:00') + 30.minutes * i).strftime('%H:%M')}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment