Shopify/search_query_parser — pull request #2 by DrewMartin (2013-09-09 16:56:03+00:00)
Title: Changed date parsing logic to work with Safari 5.1.3 and below

There's a couple problems with the existing date-parsing logic on old versions of Safari (5.1.3 and below, works fine in 5.1.7, not sure about versions in between):
* It can't do "yyyy-mm-dd" parsing and returns an invalid date
* Some versions of ECMAScript parse numbers that begin with a 0 as octals. We need to manually specify the radix when converting the number strings to integers or else "08" and "09" get parsed as 0. I suspect this was the cause of https://github.com/Shopify/shopify/issues/6111

I wanted to use a splat to make it `new Date innerText...` but coffeeScript compiled it strangely and the result was returning a string, not a Date. Since the grammar for the parser states that dates come in the format "yyyy-m(m)-d(d)" where the second month and date characters are optional, this fix should work.

@hornairs @kristianpd