C# Class System.Globalization.DateTimeFormatInfo

Inheritance: ICloneable, IFormatProvider
Mostra file Open project: theolivenbaum/h5 Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
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.

Method Details

Clone() public method

Creates a shallow copy of the DateTimeFormatInfo.
public Clone ( ) : object
return object

DateTimeFormatInfo() public method

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

GetAbbreviatedDayName() public method

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.
return string

GetAbbreviatedMonthName() public method

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.
return string

GetAllDateTimePatterns() public method

Returns all the standard patterns in which date and time values can be formatted.
public GetAllDateTimePatterns ( ) : string[]
return string[]

GetAllDateTimePatterns() public method

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.
return string[]

GetDayName() public method

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.
return string

GetFormat() public method

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.
return object

GetMonthName() public method

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.
return string

GetShortestDayName() public method

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.
return string