public function getExpiryYear()
    {
        $expiryDate = $this->getDataItem('ExpiryDate');

        if (! empty($expiryDate)) {
            // COnvert 2-digit year to 4-dogot year, in 1970-2069 range.
            $dateTime = \DateTime::createFromFormat('y', substr($expiryDate, 2, 2));
            return (int)$dateTime->format('Y');
        }
    }
public function getExpiryYear()
    {
        $expiryDate = $this->getDataItem('ExpiryDate');

        if (! empty($expiryDate)) {
            // COnvert 2-digit year to 4-dogot year, in 1970-2069 range.
            $dateTime = \DateTime::createFromFormat('y', substr($expiryDate, 2, 2));
            return (int)$dateTime->format('Y');
        }
    }
public function getExpiryYear ( ) { $ expiryDate = $ this -> getDataItem ( 'ExpiryDate' ) ; if ( ! empty ( $ expiryDate ) ) { // COnvert 2-digit year to 4-dogot year, in 1970-2069 range. $ dateTime = \ DateTime :: createFromFormat ( 'y' , substr ( $ expiryDate , 2 , 2 ) ) ; return ( int ) $ dateTime -> format ( 'Y' ) ; } }
Get the card expiry year.

@return int The full four-digit year.
Get the card expiry year .