CardExpiryDate
@objc(DTCardExpiryDate)
@objcMembers
public class CardExpiryDate : NSObject, Codable, NSCopying
Class to be used to represent the card expiry date (month and year).
-
Formats the month to a two digit string.
Declaration
Swift
public var formattedMonth: String { get }
-
Formats the year to a two digit string.
Declaration
Swift
public var formattedYear: String { get }
-
Card expiry month, [1, 12], e.g. 1 for January or 12 for December
Declaration
Swift
public var month: Int { get set }
-
Card expiry year, 2 or 4 digits, e.g. 30 or 2030
Declaration
Swift
public var year: Int { get set }
-
Initializes the card expiry date with the given month and year.
Declaration
Swift
public init(month: Int, year: Int)
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