_validate(cardDate, currentDate) {

				cardDate = cardDate ? cardDate.trim() : "";

				// Requires 2 digit for month and 2 digits for year
				if (cardDate.length === 4) {

					var year = parseInt(cardDate.substr(2, 2), 10) + 2000;
					var month = parseInt(cardDate.substr(0, 2), 10);

					if (month > 0 && month <= 12) {

						var currentYear = currentDate.getFullYear();
						if (currentYear < year)
							return true;

						if (currentYear === year) {
							var currentMonth = currentDate.getMonth() + 1;
							if (currentMonth <= month)
								return true;
						}

						// Date is in the past
						return {
							"ResultCode": "105203",
							"ResultMessage": "PAST_EXPIRY_DATE_ERROR"
						};
					}
				}

				// Date does not look correct
				return {
					"ResultCode": "105203",
					"ResultMessage": "EXPIRY_DATE_FORMAT_ERROR"
				};
			}
/**
			 * PRIVATE. Validates date code in mmyy format
			 *
			 * @param {string} cardDate Card expiration date to check
			 */
PRIVATE. Validates date code in mmyy format
@param {string} cardDate Card expiration date to check
PRIVATE . Validates date code in mmyy format @param { string } cardDate Card expiration date to check
_validate(cardDate, currentDate) {
				cardDate = cardDate ? cardDate.trim() : "";
				if (cardDate.length === 4) {
					var year = parseInt(cardDate.substr(2, 2), 10) + 2000;
					var month = parseInt(cardDate.substr(0, 2), 10);
					if (month > 0 && month <= 12) {
						var currentYear = currentDate.getFullYear();
						if (currentYear < year)
							return true;
						if (currentYear === year) {
							var currentMonth = currentDate.getMonth() + 1;
							if (currentMonth <= month)
								return true;
						}
						return {
							"ResultCode": "105203",
							"ResultMessage": "PAST_EXPIRY_DATE_ERROR"
						};
					}
				}
				return {
					"ResultCode": "105203",
					"ResultMessage": "EXPIRY_DATE_FORMAT_ERROR"
				};
			}
_validate ( cardDate , currentDate ) { cardDate = cardDate ? cardDate . trim ( ) : "" ; if ( cardDate . length === 4 ) { var year = parseInt ( cardDate . substr ( 2 , 2 ) , 10 ) + 2000 ; var month = parseInt ( cardDate . substr ( 0 , 2 ) , 10 ) ; if ( month > 0 && month <= 12 ) { var currentYear = currentDate . getFullYear ( ) ; if ( currentYear < year ) return true ; if ( currentYear === year ) { var currentMonth = currentDate . getMonth ( ) + 1 ; if ( currentMonth <= month ) return true ; } return { "ResultCode" : "105203" , "ResultMessage" : "PAST_EXPIRY_DATE_ERROR" } ; } } return { "ResultCode" : "105203" , "ResultMessage" : "EXPIRY_DATE_FORMAT_ERROR" } ; }
PRIVATE.
PRIVATE .
// Requires 2 digit for month and 2 digits for year // Date is in the past // Date does not look correct