DateTimeFormat

$(ANCHOR _DateTimeFormat) Determines how Time values are formatted, depending on the culture. Remarks: To create a DateTimeFormat for a specific culture, create a Culture for that culture and retrieve its dateTimeFormat property. To create a DateTimeFormat for the user's current culture, use the current property.

class DateTimeFormat : IFormatService {}

Constructors

this
this()

$(ANCHOR DateTimeFormat_ctor) Initializes an instance that is writable and culture-independent.

this
this(const(CultureData)* cultureData, Calendar calendar)
Undocumented in source.

Members

Functions

clone
Object clone()
getAbbreviatedDayName
const(char)[] getAbbreviatedDayName(Calendar.DayOfWeek dayOfWeek)

$(ANCHOR DateTimeFormat_getAbbreviatedDayName) Retrieves the abbreviated name of the specified day of the week based on the culture of the instance.

getAbbreviatedMonthName
const(char)[] getAbbreviatedMonthName(int month)

$(ANCHOR DateTimeFormat_getAbbreviatedMonthName) Retrieves the abbreviated name of the specified month based on the culture of the instance.

getAllDateTimePatterns
const(char)[][] getAllDateTimePatterns()

$(ANCHOR DateTimeFormat_getAllDateTimePatterns) Retrieves the standard patterns in which Time values can be formatted.

getAllDateTimePatterns
const(char)[][] getAllDateTimePatterns(char format)

$(ANCHOR DateTimeFormat_getAllDateTimePatterns_char) Retrieves the standard patterns in which Time values can be formatted using the specified format character.

getDayName
const(char)[] getDayName(Calendar.DayOfWeek dayOfWeek)

$(ANCHOR DateTimeFormat_getDayName) Retrieves the full name of the specified day of the week based on the culture of the instance.

getFormat
Object getFormat(TypeInfo type)

$(ANCHOR DateTimeFormat_getFormat) Retrieves an object defining how to format the specified type.

getMonthName
const(char)[] getMonthName(int month)

$(ANCHOR DateTimeFormat_getMonthName) Retrieves the full name of the specified month based on the culture of the instance.

Properties

abbreviatedDayNames
const(char)[][] abbreviatedDayNames [@property getter]

$(ANCHOR DateTimeFormat_abbreviatedDayNames) Property. Retrieves a string array containing the abbreviated names of the days of the week.

abbreviatedDayNames
const(char)[][] abbreviatedDayNames [@property setter]

Property. Assigns a string array containing the abbreviated names of the days of the week.

abbreviatedMonthNames
const(char)[][] abbreviatedMonthNames [@property getter]

$(ANCHOR DateTimeFormat_abbreviatedMonthNames) Property. Retrieves a string array containing the abbreviated names of the months.

abbreviatedMonthNames
const(char)[][] abbreviatedMonthNames [@property setter]

Property. Assigns a string array containing the abbreviated names of the months.

amDesignator
const(char)[] amDesignator [@property getter]

$(ANCHOR DateTimeFormat_amDesignator) Property. Retrieves the string designator for hours before noon.

amDesignator
const(char)[] amDesignator [@property setter]

Property. Assigns the string designator for hours before noon.

calendar
Calendar calendar [@property getter]

Property. Retrieves the calendar used by the current culture.

calendar
Calendar calendar [@property setter]

$(ANCHOR DateTimeFormat_calendar) Property. Assigns the calendar to be used by the current culture.

calendarWeekRule
Calendar.WeekRule calendarWeekRule [@property getter]

$(ANCHOR DateTimeFormat_calendarWeekRule) Property. Retrieves the _value indicating the rule used to determine the first week of the year.

calendarWeekRule
Calendar.WeekRule calendarWeekRule [@property setter]

Property. Assigns the _value indicating the rule used to determine the first week of the year.

current
DateTimeFormat current [@property getter]

$(ANCHOR DateTimeFormat_current) Property. Retrieves a read-only DateTimeFormat instance from the current culture.

dateSeparator
const(char)[] dateSeparator [@property getter]

$(ANCHOR DateTimeFormat_dateSeparator) Property. Retrieves the string separating date components.

dateSeparator
const(char)[] dateSeparator [@property setter]

Property. Assigns the string separating date components.

dayNames
const(char)[][] dayNames [@property getter]

$(ANCHOR DateTimeFormat_dayNames) Property. Retrieves a string array containing the full names of the days of the week.

dayNames
const(char)[][] dayNames [@property setter]

Property. Assigns a string array containing the full names of the days of the week.

firstDayOfWeek
Calendar.DayOfWeek firstDayOfWeek [@property getter]

$(ANCHOR DateTimeFormat_firstDayOfWeek) Property. Retrieves the first day of the week.

firstDayOfWeek
Calendar.DayOfWeek firstDayOfWeek [@property setter]

Property. Assigns the first day of the week.

fullDateTimePattern
const(char)[] fullDateTimePattern [@property getter]

$(ANCHOR DateTimeFormat_fullDateTimePattern) Property. Retrieves the format pattern for a long date and a long time value.

fullDateTimePattern
const(char)[] fullDateTimePattern [@property setter]

Property. Assigns the format pattern for a long date and a long time _value.

generalLongTimePattern
const(char)[] generalLongTimePattern [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
generalShortTimePattern
const(char)[] generalShortTimePattern [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isReadOnly
bool isReadOnly [@property getter]

$(ANCHOR DateTimeFormat_isReadOnly) Property. Retrieves a value indicating whether the instance is read-only.

longDatePattern
const(char)[] longDatePattern [@property getter]

$(ANCHOR DateTimeFormat_longDatePattern) Property. Retrieves the format pattern for a long date value.

longDatePattern
const(char)[] longDatePattern [@property setter]

Property. Assigns the format pattern for a long date _value.

longDatePatterns
const(char)[][] longDatePatterns [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
longTimePattern
const(char)[] longTimePattern [@property getter]

$(ANCHOR DateTimeFormat_longTimePattern) Property. Retrieves the format pattern for a long time value.

longTimePattern
const(char)[] longTimePattern [@property setter]

Property. Assigns the format pattern for a long time _value.

longTimePatterns
const(char)[][] longTimePatterns [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
monthDayPattern
const(char)[] monthDayPattern [@property getter]

$(ANCHOR DateTimeFormat_monthDayPattern) Property. Retrieves the format pattern for a month and day value.

monthDayPattern
const(char)[] monthDayPattern [@property setter]

Property. Assigns the format pattern for a month and day _value.

monthNames
const(char)[][] monthNames [@property getter]

$(ANCHOR DateTimeFormat_monthNames) Property. Retrieves a string array containing the full names of the months.

monthNames
const(char)[][] monthNames [@property setter]

Property. Assigns a string array containing the full names of the months.

nativeCalendarName
const(char)[] nativeCalendarName [@property getter]

$(ANCHOR DateTimeFormat_nativeCalendarName) Property. Retrieves the native name of the calendar associated with the current instance.

pmDesignator
const(char)[] pmDesignator [@property getter]

$(ANCHOR DateTimeFormat_pmDesignator) Property. Retrieves the string designator for hours after noon.

pmDesignator
const(char)[] pmDesignator [@property setter]

Property. Assigns the string designator for hours after noon.

rfc1123Pattern
const(char)[] rfc1123Pattern [@property getter]

$(ANCHOR DateTimeFormat_rfc1123Pattern) Property. Retrieves the format pattern based on the IETF RFC 1123 specification, for a time value.

shortDatePattern
const(char)[] shortDatePattern [@property getter]

$(ANCHOR DateTimeFormat_shortDatePattern) Property. Retrieves the format pattern for a short date value.

shortDatePattern
const(char)[] shortDatePattern [@property setter]

Property. Assigns the format pattern for a short date _value.

shortDatePatterns
const(char)[][] shortDatePatterns [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
shortTimePattern
const(char)[] shortTimePattern [@property getter]

$(ANCHOR DateTimeFormat_shortTimePattern) Property. Retrieves the format pattern for a short time value.

shortTimePattern
const(char)[] shortTimePattern [@property setter]

Property. Assigns the format pattern for a short time _value.

shortTimePatterns
const(char)[][] shortTimePatterns [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
sortableDateTimePattern
const(char)[] sortableDateTimePattern [@property getter]

$(ANCHOR DateTimeFormat_sortableDateTimePattern) Property. Retrieves the format pattern for a sortable date and time value.

timeSeparator
const(char)[] timeSeparator [@property getter]

$(ANCHOR DateTimeFormat_timeSeparator) Property. Retrieves the string separating time components.

timeSeparator
const(char)[] timeSeparator [@property setter]

Property. Assigns the string separating time components.

universalSortableDateTimePattern
const(char)[] universalSortableDateTimePattern [@property getter]

$(ANCHOR DateTimeFormat_universalSortableDateTimePattern) Property. Retrieves the format pattern for a universal date and time value.

yearMonthPattern
const(char)[] yearMonthPattern [@property getter]

$(ANCHOR DateTimeFormat_yearMonthPattern) Property. Retrieves the format pattern for a year and month value.

yearMonthPattern
const(char)[] yearMonthPattern [@property setter]

Property. Assigns the format pattern for a year and month _value.

yearMonthPatterns
const(char[])[] yearMonthPatterns [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

getInstance
DateTimeFormat getInstance(IFormatService formatService)

$(ANCHOR DateTimeFormat_getInstance) Retrieves the DateTimeFormat for the specified IFormatService.

invariantFormat
DateTimeFormat invariantFormat()

$(ANCHOR DateTimeFormat_invariantFormat) Property. Retrieves a read-only DateTimeFormat instance that is culturally independent.

Variables

isReadOnly_
bool isReadOnly_;
Undocumented in source.

Inherited Members

From IFormatService

getFormat
Object getFormat(TypeInfo type)

$(ANCHOR IFormatService_getFormat) Retrieves an object that supports formatting for the specified _type.

Meta