After reading the OP's upper validity of 20 years for Amazon, I wrote this simple solution in PHP:
<select name='Expiry-Year'>
<option value="">yy</option>
<?php
for($i=0;$i<21;$i++){
echo "<option value='".(date('Y')+$i)."'>".(date('y')+$i)."</option>\n";
}
?>
</select>
This has greatly reduced the number of these new-year requests to remove last year
from a form.
A leaner version of the loop runs ~twice as quickly:
<select name='Expiry-Year'>
<option value="">yy</option>
<?php
for($i=date('Y');$i<date('Y')+21;$i++){
echo "<option value='".$i."'>".substr($i,2)."</option>\n";
}
?>
</select>