class DateTimeFormatInfo
in global :: System . Globalization
Provides culture-specific information about the format of date and time values.
public string[] AbbreviatedDayNames { get; set; }
Gets or sets a one-dimensional array of type containing the culture-specific abbreviated names of the days of the week.
- Returns A one-dimensional array of type containing the culture-specific abbreviated names of the days of the week. The array for contains "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat".
public string[] AbbreviatedMonthGenitiveNames { get; set; }
Gets or sets a string array of abbreviated month names associated with the current object.
- Returns An array of abbreviated month names.
public string[] AbbreviatedMonthNames { get; set; }
Gets or sets a one-dimensional string array that contains the culture-specific abbreviated names of the months.
- Returns A one-dimensional string array with 13 elements that contains the culture-specific abbreviated names of the months. For 12-month calendars, the 13th element of the array is an empty string. The array for contains "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", and "".
public string AMDesignator { get; set; }
Gets or sets the string designator for hours that are "ante meridiem" (before noon).
- Returns The string designator for hours that are ante meridiem. The default for is "AM".
public Calendar Calendar { get; set; }
Gets or sets the calendar to use for the current culture.
- Returns The calendar to use for the current culture. The default for is a object.
public CalendarWeekRule CalendarWeekRule { get; set; }
Gets or sets a value that specifies which rule is used to determine the first calendar week of the year.
- Returns A value that determines the first calendar week of the year. The default for is .
public static DateTimeFormatInfo CurrentInfo { get; }
Gets a read-only object that formats values based on the current culture.
- Returns A read-only object based on the object for the current thread.
public string DateSeparator { get; set; }
Gets or sets the string that separates the components of a date, that is, the year, month, and day.
- Returns The string that separates the components of a date, that is, the year, month, and day. The default for is "/".
public string[] DayNames { get; set; }
Gets or sets a one-dimensional string array that contains the culture-specific full names of the days of the week.
- Returns A one-dimensional string array that contains the culture-specific full names of the days of the week. The array for contains "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday".
public DayOfWeek FirstDayOfWeek { get; set; }
Gets or sets the first day of the week.
- Returns An enumeration value that represents the first day of the week. The default for is .
public string FullDateTimePattern { get; set; }
Gets or sets the custom format string for a long date and long time value.
- Returns The custom format string for a long date and long time value.
public string GetAbbreviatedDayName( DayOfWeek dayofweek )
Returns the culture-specific abbreviated name of the specified day of the week based on the culture associated with the current object.
dayofweekA value.- Returns The culture-specific abbreviated name of the day of the week represented by .
public string GetAbbreviatedEraName( int era )
Returns the string containing the abbreviated name of the specified era, if an abbreviation exists.
eraThe integer representing the era.- Returns A string containing the abbreviated name of the specified era, if an abbreviation exists. -or- A string containing the full name of the era, if an abbreviation does not exist.
public string GetAbbreviatedMonthName( int month )
Returns the culture-specific abbreviated name of the specified month based on the culture associated with the current object.
monthAn integer from 1 through 13 representing the name of the month to retrieve.- Returns The culture-specific abbreviated name of the month represented by .
public string[] GetAllDateTimePatterns( char format )
Returns all the patterns in which date and time values can be formatted using the specified standard format string.
formatA standard format string.- Returns An array containing the standard patterns in which date and time values can be formatted using the specified format string.
public string GetDayName( DayOfWeek dayofweek )
Returns the culture-specific full name of the specified day of the week based on the culture associated with the current object.
dayofweekA value.- Returns The culture-specific full name of the day of the week represented by .
public int GetEra( string eraName )
Returns the integer representing the specified era.
eraNameThe string containing the name of the era.- Returns The integer representing the era, if is valid; otherwise, -1.
public string GetEraName( int era )
Returns the string containing the name of the specified era.
eraThe integer representing the era.- Returns A string containing the name of the era.
public object GetFormat( Type formatType )
Returns an object of the specified type that provides a date and time formatting service.
formatTypeThe type of the required formatting service.- Returns The current object, if is the same as the type of the current ; otherwise, .
public static DateTimeFormatInfo GetInstance( IFormatProvider provider )
Returns the object associated with the specified .
providerThe that gets the object. -or- to get .- Returns A object associated with .
public string GetMonthName( int month )
Returns the culture-specific full name of the specified month based on the culture associated with the current object.
monthAn integer from 1 through 13 representing the name of the month to retrieve.- Returns The culture-specific full name of the month represented by .
public string GetShortestDayName( DayOfWeek dayOfWeek )
Obtains the shortest abbreviated day name for a specified day of the week associated with the current object.
dayOfWeekOne of the values.- Returns The abbreviated name of the week that corresponds to the parameter.
public static DateTimeFormatInfo InvariantInfo { get; }
Gets the default read-only object that is culture-independent (invariant).
- Returns A read-only object that is culture-independent (invariant).
public bool IsReadOnly { get; }
Gets a value indicating whether the object is read-only.
- Returns if the object is read-only; otherwise, .
public string LongDatePattern { get; set; }
Gets or sets the custom format string for a long date value.
- Returns The custom format string for a long date value.
public string LongTimePattern { get; set; }
Gets or sets the custom format string for a long time value.
- Returns The format pattern for a long time value.
public string MonthDayPattern { get; set; }
Gets or sets the custom format string for a month and day value.
- Returns The custom format string for a month and day value.
public string[] MonthGenitiveNames { get; set; }
Gets or sets a string array of month names associated with the current object.
- Returns A string array of month names.
public string[] MonthNames { get; set; }
Gets or sets a one-dimensional array of type containing the culture-specific full names of the months.
- Returns A one-dimensional array of type containing the culture-specific full names of the months. In a 12-month calendar, the 13th element of the array is an empty string. The array for contains "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", and "".
public string NativeCalendarName { get; }
Gets the native name of the calendar associated with the current object.
- Returns The native name of the calendar used in the culture associated with the current object if that name is available, or the empty string ("") if the native calendar name is not available.
public string PMDesignator { get; set; }
Gets or sets the string designator for hours that are "post meridiem" (after noon).
- Returns The string designator for hours that are "post meridiem" (after noon). The default for is "PM".
public static DateTimeFormatInfo ReadOnly( DateTimeFormatInfo dtfi )
Returns a read-only wrapper.
dtfiThe object to wrap.- Returns A read-only wrapper.
public string RFC1123Pattern { get; }
Gets the custom format string for a time value that is based on the Internet Engineering Task Force (IETF) Request for Comments (RFC) 1123 specification.
- Returns The custom format string for a time value that is based on the IETF RFC 1123 specification.
public void SetAllDateTimePatterns( string[] patterns, char format )
Sets the custom date and time format strings that correspond to a specified standard format string.
patternsAn array of custom format strings.formatThe standard format string associated with the custom format strings specified in the parameter.
public string ShortDatePattern { get; set; }
Gets or sets the custom format string for a short date value.
- Returns The custom format string for a short date value.
public string[] ShortestDayNames { get; set; }
Gets or sets a string array of the shortest unique abbreviated day names associated with the current object.
- Returns A string array of day names.
public string ShortTimePattern { get; set; }
Gets or sets the custom format string for a short time value.
- Returns The custom format string for a short time value.
public string SortableDateTimePattern { get; }
Gets the custom format string for a sortable date and time value.
- Returns The custom format string for a sortable date and time value.
public string TimeSeparator { get; set; }
Gets or sets the string that separates the components of time, that is, the hour, minutes, and seconds.
- Returns The string that separates the components of time. The default for is ":".
public string UniversalSortableDateTimePattern { get; }
Gets the custom format string for a universal, sortable date and time string, as defined by ISO 8601.
- Returns The custom format string for a universal, sortable date and time string.
public string YearMonthPattern { get; set; }
Gets or sets the custom format string for a year and month value.
- Returns The custom format string for a year and month value.
public int GetHashCode( )
😔 No documentation found.
public object Clone( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public string[] GetAllDateTimePatterns( )
😔 No documentation found.
public DateTimeFormatInfo( )
😔 No documentation found.