Hacker News new | ask | show | jobs
by sethist 4881 days ago
Fair enough, I haven't dug into the code yet. I was basing my comment on the live demo which prevents it.
1 comments

Huh? If you literally type '1/13' into the live demo it works as one would expect. '113' works too, it just assumes the month is eleven, and the year starts with 3.
If you literally type '1/13' into the live demo it interprets it as '11/3' because it does not allow a '/' character to be entered as cpeterso mentioned
I was referring to the live demo at http://stripe.github.com/jquery.payment/example/. Either way, I wouldn't consider the library interpreting 113 as 11/3 as a "working".
So what do you suggest "113" should be interpreted as?
There are three ways to interpret it. It is either 11/3, 1/13, or an error. Since 11/3 isn't a valid date, I think it is safe to rule that out as an incorrect interpretation. Either of the other two interpretations seem acceptable to me.
Er, since when is 11/3 not a valid date?
Not for a credit card expiration date...
I think he's suggesting that 113 should be interpreted as 1/13. I'm not sure how simple that logic would be to implement, though.
113 is ambiguous. Its an error