Skip to content

Instantly share code, notes, and snippets.

@deatheragetr
Created April 6, 2015 16:31
Show Gist options
  • Save deatheragetr/8c6534d86726ad13e35d to your computer and use it in GitHub Desktop.
Save deatheragetr/8c6534d86726ad13e35d to your computer and use it in GitHub Desktop.
ti = TimeInterval.parse = "R12/2015-01-31T11:59:00-5:00/P1M"
ti.to_a.each { |i| puts i.start_time }
=Begin
2015-01-31 11:59:00 -0500
2015-02-28 11:59:00 -0500
2015-03-28 11:59:00 -0400
2015-04-28 11:59:00 -0400
2015-05-28 11:59:00 -0400
2015-06-28 11:59:00 -0400
2015-07-28 11:59:00 -0400
2015-08-28 11:59:00 -0400
2015-09-28 11:59:00 -0400
2015-10-28 11:59:00 -0400
2015-11-28 11:59:00 -0500
2015-12-28 11:59:00 -0500
=End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment