CardExpiryDate

class CardExpiryDate(month: Int, year: Int) : Serializable

Class to be used to represent the card expiry date (month and year).

Parameters

month

Card expiry month, 1, 12, e.g. 1 for January or 12 for December

year

Card expiry year, 2 or 4 digits, e.g. 30 or 2030

Constructors

Link copied to clipboard
constructor(month: Int, year: Int)

Initializes the card expiry date with the given month and year.

Properties

Link copied to clipboard

Formats the month to a two digit string.

Link copied to clipboard

Formats the year to a two digit string.

Link copied to clipboard
var month: Int

Card expiry month, 1, 12, e.g. 1 for January or 12 for December

Link copied to clipboard
var year: Int

Card expiry year, 2 or 4 digits, e.g. 30 or 2030

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String