Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Provides culture-specific information about the format of date and time values.
Inheritance Hierarchy
System. . :: . .Object
System.Globalization..::..DateTimeFormatInfo
Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public NotInheritable Class DateTimeFormatInfo
public sealed class DateTimeFormatInfo
public ref class DateTimeFormatInfo sealed
[<Sealed>]
type DateTimeFormatInfo = class end
public final class DateTimeFormatInfo
The DateTimeFormatInfo type exposes the following members.
Properties
Name | Description | |
---|---|---|
![]() |
AbbreviatedDayNames | Gets or sets a one-dimensional array of type String containing the culture-specific abbreviated names of the days of the week. |
![]() |
AbbreviatedMonthNames | Gets or sets a one-dimensional string array that contains the culture-specific abbreviated names of the months. |
![]() |
AMDesignator | Gets or sets the string designator for hours that are "ante meridiem" (before noon). |
![]() ![]() |
CurrentInfo | Gets a read-only DateTimeFormatInfo object that formats values based on the current culture. |
![]() |
DateSeparator | Gets or sets the string that separates the components of a date, that is, the year, month, and day. |
![]() |
DayNames | Gets or sets a one-dimensional string array that contains the culture-specific full names of the days of the week. |
![]() |
FullDateTimePattern | Gets or sets the custom format string for a long date and long time value. |
![]() |
LongDatePattern | Gets or sets the custom format string for a long date value. |
![]() |
LongTimePattern | Gets or sets the custom format string for a long time value. |
![]() |
MonthDayPattern | Gets or sets the custom format string for a month and day value. |
![]() |
MonthNames | Gets or sets a one-dimensional array of type String containing the culture-specific full names of the months. |
![]() |
PMDesignator | Gets or sets the string designator for hours that are "post meridiem" (after noon). |
![]() |
RFC1123Pattern | 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. |
![]() |
ShortDatePattern | Gets or sets the custom format string for a short date value. |
![]() |
ShortTimePattern | Gets or sets the custom format string for a short time value. |
![]() |
SortableDateTimePattern | Gets the custom format string for a sortable date and time value. |
![]() |
TimeSeparator | Gets or sets the string that separates the components of time, that is, the hour, minutes, and seconds. |
![]() |
UniversalSortableDateTimePattern | Gets the custom format string for a universal, sortable date and time string. |
![]() |
YearMonthPattern | Gets or sets the custom format string for a year and month value. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
The properties of the DateTimeFormatInfo class contain culture-specific information for formatting or parsing date and time values such as the following:
The patterns used to format date values.
The patterns used to format time values.
The names of the days of the week.
The names of the months of the year.
The A.M. and P.M. designators used in time values.
The calendar in which dates are expressed.
This behavior is particularly important in the case of serialization. The .NET Framework persists all overridable settings, instead of persisting only the settings that are accessed at the time of serialization.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.