Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php validate credit card expiration date

$expires =  date_format( DateTime::createFromFormat('ym', $cc_expiration),"ym");

$now =  date_format(new DateTime(),"ym");

if ($expires < $now) {
    return 'Expired!';
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #validate #credit #card #expiration #date
ADD COMMENT
Topic
Name
7+2 =