data class ExpiryDate
Data class to hold expiry data
id - Actual account id as String
month - 1-2 numeric chars, accepted 1-12
1-4 numeric chars. For years <= 999 2000 is added
You can check if expiry date is valid with isValid
ExpiryDate(month: String, year: String)
Data class to hold expiry data |
val isValid: Boolean
Check if the expiry date is valid |
|
val month: String
1-2 numeric chars, accepted 1-12 |
|
val year: String
1-4 numeric chars. For years <= 999 2000 is added |
fun format(expiryDate: String, deleting: Boolean = false): String
Format the expiration date |
|
fun fromString(expiryDate: String): ExpiryDate?
Get ExpiryDate from raw expiration date string |
|
fun isValid(expiryDateString: String): Boolean
Check if expiration date is valid |