stripe/jquery.payment — pull request #39 by kulte (2013-02-21 01:24:19+00:00)
Title: $.payment.validateCardExpiry(month, year) now supports year shorthand as advertised

### $.payment.validateCardExpiry(month, year) correct year shorthand support

* `$.payment.validateCardExpiry(month, year)` does not correctly support year shorthand in its current state.
* The reason for this is that the JavaScript `Date` class appends 19, not 20 as the numerical prefix for the `year` argument supplied to the constructor i.e. `var d = new Date(year, month, day, hours, minutes, seconds, milliseconds);`

This pull request includes the following:

* A test, initially failing, then made to pass, which asserts that `$.payment.validateCardExpiry('05', '20') == true`
* An additional line added to the function definition for `$.payment.validateCardExpiry(month, year)` which uses CoffeeScript string interpolation to append a leading "20" to `year` before it gets passed to the `Date` constructor, ensuring that this library supports year shorthand for at least the next 87 years :smile: