I think the 'correct' answer here is to use something like https://github.com/robertwilczynski/nChronic. It's a port of the Ruby equivalent and can parse a wide range of date time formats, as listed here: http://chronic.rubyforge.org/ in the 'Examples' section (scroll down).