card.io-iOS-source icon indicating copy to clipboard operation
card.io-iOS-source copied to clipboard

Accept a broader range of expiry years

Open AlanYen opened this issue 10 years ago • 3 comments
trafficstars

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)

AlanYen avatar Jul 22 '15 10:07 AlanYen

@dgoldman-ebay IIRC we used to accept cards up to 15 years in the future. Thoughts?

josharian avatar Jul 23 '15 17:07 josharian

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?

dgoldman-pdx avatar Jul 23 '15 17:07 dgoldman-pdx

8 years SGTM.

josharian avatar Jul 23 '15 18:07 josharian