C# Класс Kurejito.Payments.CardDate

Represents the month/year date format used to encode payment card start dates and expiry dates.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

CardDate() публичный Метод

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.
Результат System

CardDate() публичный Метод

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.
Результат System

Parse() публичный статический Метод

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"
Результат CardDate

ToString() публичный Метод

Returns a T:System.String that represents the current T:System.Object.
public ToString ( ) : string
Результат string

ToString() публичный Метод

Returns a System.String that represents this instance, formatted with the separator.
public ToString ( string separator ) : string
separator string The separator.
Результат string