card.io-iOS-source
card.io-iOS-source copied to clipboard
Accept a broader range of expiry years
1). I found that the check rule of "expiry" is not correct for most of my cards and no scan result in "expiry" field!! (Most of my cards' maximum year of expiry is "2020") The check rule in function "expiry_string_to_expiry_month_and_year" ( in expiry_categorize.cpp , dmz) is as below, and it is not correct.
if (full_year < current_year + 5
&& (full_year > current_year || (full_year == current_year && month >= current_month))
) {
..................
}
2). I got some information by Google, and it seems that maximum year of expiry may be between 3~8 (usually 5)
@dgoldman-ebay IIRC we used to accept cards up to 15 years in the future. Thoughts?
The greater our tolerance, the fewer complaints we'll get from people entering far-future cards. But we'll also see some increase in incorrect expiry scans for near-future cards being interpreted as farther in the future than they really are.
It's a tradeoff, and not one that's easy to quantitate.
So if people are going to be complaining about 5 years being too tight a tolerance, I'd lean toward opening things up a bit, but not too much. Based on @AlanYen's googling, how about 8 years?
8 years SGTM.