C# Class Kurejito.Payments.CardDate

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

Méthodes publiques

Méthode 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 méthode

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.
Résultat System

CardDate() public méthode

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.
Résultat System

Parse() public static méthode

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"
Résultat CardDate

ToString() public méthode

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

ToString() public méthode

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