Various online services have different values for maximum year of expiry, when it comes to Credit Cards.
For instance:
After reading the OP's upper validity of 20 years for Amazon, I wrote this simple solution in PHP:
yy ".(date('y')+$i)."\n"; } ?>
This has greatly reduced the number of these new-year requests to remove last year from a form.
last year
A leaner version of the loop runs ~twice as quickly:
yy ".substr($i,2)."\n"; } ?>