C# Класс System.Globalization.DateTimeFormatInfo

Наследование: ICloneable, IFormatProvider
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

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

Метод Описание
Clone ( ) : object

Creates a shallow copy of the DateTimeFormatInfo.

DateTimeFormatInfo ( )

Initializes a new writable instance of the DateTimeFormatInfo class that is culture-independent (invariant).

GetAbbreviatedDayName ( DayOfWeek dayofweek ) : string

Returns the culture-specific abbreviated name of the specified day of the week based on the culture associated with the current DateTimeFormatInfo object.

GetAbbreviatedMonthName ( int month ) : string

Returns the culture-specific abbreviated name of the specified month based on the culture associated with the current DateTimeFormatInfo object.

GetAllDateTimePatterns ( ) : string[]

Returns all the standard patterns in which date and time values can be formatted.

GetAllDateTimePatterns ( char format ) : string[]

Returns all the patterns in which date and time values can be formatted using the specified standard format string.

GetDayName ( DayOfWeek dayofweek ) : string

Returns the culture-specific full name of the specified day of the week based on the culture associated with the current DateTimeFormatInfo object.

GetFormat ( Type formatType ) : object

Returns an object of the specified type that provides a date and time formatting service.

GetMonthName ( int month ) : string

Returns the culture-specific full name of the specified month based on the culture associated with the current DateTimeFormatInfo object.

GetShortestDayName ( DayOfWeek dayOfWeek ) : string

Obtains the shortest abbreviated day name for a specified day of the week associated with the current DateTimeFormatInfo object.

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

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

Creates a shallow copy of the DateTimeFormatInfo.
public Clone ( ) : object
Результат object

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

Initializes a new writable instance of the DateTimeFormatInfo class that is culture-independent (invariant).
public DateTimeFormatInfo ( )

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

Returns the culture-specific abbreviated name of the specified day of the week based on the culture associated with the current DateTimeFormatInfo object.
public GetAbbreviatedDayName ( DayOfWeek dayofweek ) : string
dayofweek DayOfWeek A System.DayOfWeek value.
Результат string

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

Returns the culture-specific abbreviated name of the specified month based on the culture associated with the current DateTimeFormatInfo object.
public GetAbbreviatedMonthName ( int month ) : string
month int An integer from 1 through 13 representing the name of the month to retrieve.
Результат string

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

Returns all the standard patterns in which date and time values can be formatted.
public GetAllDateTimePatterns ( ) : string[]
Результат string[]

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

Returns all the patterns in which date and time values can be formatted using the specified standard format string.
public GetAllDateTimePatterns ( char format ) : string[]
format char A standard format string.
Результат string[]

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

Returns the culture-specific full name of the specified day of the week based on the culture associated with the current DateTimeFormatInfo object.
public GetDayName ( DayOfWeek dayofweek ) : string
dayofweek DayOfWeek A System.DayOfWeek value.
Результат string

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

Returns an object of the specified type that provides a date and time formatting service.
public GetFormat ( Type formatType ) : object
formatType Type The type of the required formatting service.
Результат object

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

Returns the culture-specific full name of the specified month based on the culture associated with the current DateTimeFormatInfo object.
public GetMonthName ( int month ) : string
month int An integer from 1 through 13 representing the name of the month to retrieve.
Результат string

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

Obtains the shortest abbreviated day name for a specified day of the week associated with the current DateTimeFormatInfo object.
public GetShortestDayName ( DayOfWeek dayOfWeek ) : string
dayOfWeek DayOfWeek One of the DayOfWeek values.
Результат string