Skip to content

Instantly share code, notes, and snippets.

@maletor
Created January 19, 2012 20:24
Show Gist options
  • Save maletor/1642352 to your computer and use it in GitHub Desktop.
Save maletor/1642352 to your computer and use it in GitHub Desktop.
One line
date = parsed_response[0][0].match(/Assignments for (\S*)/)
date = $1
date = date.gsub!(/(\d{1,2})-(\d{1,2})-(\d{2})/, '\1/\2/20\3')
self.date = Date.parse(date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment