Skip to content

Instantly share code, notes, and snippets.

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 yoozoosato/509134 to your computer and use it in GitHub Desktop.
Save yoozoosato/509134 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'parsedate'
f = open("target.txt")
f.each{ |line|
day = ParseDate::parsedate(line)
year = day[0].to_s
month = day[1].to_s
day = day[2].to_s
puts year + "/" + month + "/" + day
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment