C# Class Kurejito.Payments.CardDate

Represents the month/year date format used to encode payment card start dates and expiry dates.
Datei anzeigen Open project: Kurejito/Kurejito Class Usage Examples

Public Methods

Method Description
CardDate ( System.DateTime dateTime ) : System

Initializes a new instance of the CardDate class based on the provided dateTime.

CardDate ( int month, int year ) : System

Construct a new CardDate based on the specified month and year.

Parse ( string dateString ) : CardDate

Converts a string representation of a card expiry date into a valid CardDate instance.

ToString ( ) : string

Returns a T:System.String that represents the current T:System.Object.

ToString ( string separator ) : string

Returns a System.String that represents this instance, formatted with the separator.

Method Details

CardDate() public method

Initializes a new instance of the CardDate class based on the provided dateTime.
public CardDate ( System.DateTime dateTime ) : System
dateTime System.DateTime The date time.
return System

CardDate() public method

Construct a new CardDate based on the specified month and year.
public CardDate ( int month, int year ) : System
month int The month, as a number between 1 (January) and 12 (December)
year int The year. Values below are in the current century; values above this threshold are in the previous century.
return System

Parse() public static method

Converts a string representation of a card expiry date into a valid CardDate instance.
public static Parse ( string dateString ) : CardDate
dateString string A string containing a date in the format "MMYY" or "MM/YY"
return CardDate

ToString() public method

Returns a T:System.String that represents the current T:System.Object.
public ToString ( ) : string
return string

ToString() public method

Returns a System.String that represents this instance, formatted with the separator.
public ToString ( string separator ) : string
separator string The separator.
return string