Ruby: convert string to date
date, ruby, string
Solution
You could also use `Date.strptime`:
Date.strptime("{ 2009, 4, 15 }", "{ %Y, %m, %d }")
Problem
In Ruby, what's the best way to convert a string of the format: `"{ 2009, 4, 15 }"` to a Date?
date, ruby, string
You could also use `Date.strptime`:
Date.strptime("{ 2009, 4, 15 }", "{ %Y, %m, %d }")
In Ruby, what's the best way to convert a string of the format: `"{ 2009, 4, 15 }"` to a Date?