View Full Version : verifying date

01-20-2003, 12:58 PM
How do you validate a credit card expiration year and verify in comparison with the current date that the credit card expiration date is valid?

01-20-2003, 10:25 PM
In a nutshell....

var d = new Date();
var y = d.getFullYear();
if ( parseInt( document.formName.inputName.value, 10 ) < y )
alert( "Your card has expired!" );

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum