Actions
Bug #6818
closedIncorrect Date.parse results
Bug #6818:
Incorrect Date.parse results
Description
Since this is a standard library and I couldn't find a dedicated page for the Date module
require 'time
Date.parse '07/31/2012'
ArgumentError: invalid date
from (pry):3:in `parse'
In the United States, MM/DD/YYYY is perhaps the most common way to write dates. I found somewhere in prior posts suggestions to convert to Euro style which may alson include DD/MM/YYYY but that is not correct for US. There should at least be a way to choose the region, it can not always be deduced from syntax of date alone.
Actions