DateOptions members

Provides access to properties and methods that are used to view and set date options.

The DateOptions type exposes the following members.

Constructors

  Name Description
Public method DateOptions(String, SPCalendarType, String, String, String, String, String) Initializes a new instance of the DateOptions class, based upon the locale identifier, calendar type, work days in a week, first day of the week displayed in the calendar, adjustment for Ramadan and regional differences, the time zone offset from UTC, and the currently selected calendar date.
Public method DateOptions(String, SPCalendarType, String, String, String, String, String, String) Initializes a new instance of the DateOptions class, based upon the locale identifier, calendar type, work days in a week, first day of the week displayed in the calendar, adjustment for Ramadan and regional differences, the time zone offset from UTC, the last year of a 100-year range, and the currently selected calendar date.
Public method DateOptions(String, SPCalendarType, String, String, String, String, String, Boolean, String) Initializes a new instance of the DateOptions class, based upon the locale identifier, calendar type, work days in a week, first day of the week displayed in the calendar, adjustment for Ramadan and regional differences, the time zone offset from UTC, the last year of a 100-year range, whether the ISO8601 date format will be used, and the currently selected calendar date.

Top

Properties

  Name Description
Public property AMDesignator Gets the string designator for hours that are "ante meridiem" (before noon).
Public property Calendar Gets the current calendar.
Public property CalendarType Gets the type of the current calendar.
Public property DateSeparator Gets the character or text that separates the components of date; that is, the month, day, and year.
Public property DateTimeFormat Gets the current DateTimeFormat derived from the regional settings and the calendar.
Public property DayNames Gets the culture-specific full names of the days of the week.
Public property FirstDayOfWeek Gets a value that represents the first day of the week displayed in the calendar.
Public property HijriAdjustment Gets the number of days to add or subtract from the calendar to accommodate the variances in the start and the end of Ramadan and to accommodate the date difference between countries/regions.
Public property Lang Gets the language used for date options.
Public property LongDatePattern Gets the format pattern for a long date value, which is associated with the ā€œDā€ standard format character.
Public property MonthDayPattern Gets the format pattern for a month and day value. The pattern is associated with the "m" and "M" format characters.
Public property PMDesignator Gets the string designator for hours that are "post meridiem" (after noon).
Public property SelectedDate Gets the currently selected date.
Public property ShortDatePattern Gets the format pattern for a short date value, which is associated with the "d" format character.
Public property TimePattern12Hour Gets the current 12-hour time format pattern.
Public property TimePattern24Hour Gets the current 24-hour time format pattern.
Public property TimeSeparator Gets the character or string that separates the components of time; that is, the hour, minutes, and seconds.
Public property Today Gets the current date.

Top

Methods

  Name Description
Public method AddDays Returns a date that is the specified number of days away from the specified date.
Public method AddMonths Returns a date that is the specified number of months away from the specified date.
Public method AddYears Returns a date that is the specified number of years away from the specified date.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method fixYear Returns a SimpleDate object that represents a date value that is corrected to conform to the requirements of the current international calendar.
Public method Get12Hours Returns the hour values used for a 12-hour clock.
Public method GetDateString Returns a string representation of the specified date and uses the specified format.
Public method GetDayChar(Int32) Returns a string representation of the specified calendar day.
Public method GetDayChar(Int32, SPCalendarType) Returns a string representation of the specified calendar day and uses the specified calendar type.
Public method GetDaysAbbreviation Returns abbreviations for the current days of the week.
Public method GetDaysSuperShortAbbreviation Returns short abbreviations for the current days of the week.
Public method GetDowLongDateString Returns a string representation of the day of week of the specified date.
Public method GetHashCode (Inherited from Object.)
Public method GetHoursString Returns the hour values used to display time values in the specified format.
Public method GetLeapMonthNames Gets the full names of the months for a leap year.
Public method GetLeapMonthNamesAbbreviation Gets the abbreviation names of the months for a leap year.
Public method GetLongTimePattern Gets the format pattern for a long time value.
Public method GetMonthDayDateString Returns a string representation of the month and day of the specified date.
Public method GetMonthNames() Gets the full names of the months for non-leap year.
Public method GetMonthNames(SimpleDate) Returns the month names used to display the specified date.
Public method GetMonthNamesAbbreviation() Returns an abbreviated version of the month names used to display the date.
Public method GetMonthNamesAbbreviation(SimpleDate) Returns an abbreviated version of the month names used to display the specified date.
Public method GetMonthYearString Returns a string representation of the month and year of the specified date.
Public method GetShortDateString Returns a string representation of the specified date and uses the short date format.
Public method GetShortDayAbbreviation Returns shortened abbreviations for the current days of the week.
Public method GetShortTimePattern Gets the format pattern for a short time value.
Public method GetTimeString Returns a string representation of the elapsed time between two specified DateTime values.
Public method GetTimeStringFromPattern Returns a string representation of a specified DateTime value.
Public method GetType (Inherited from Object.)
Public method GetYearString Returns a string representation of the year of the specified date.
Public method IsWorkDay Returns a Boolean value that indicates whether the specified day is a work day.
Protected method MemberwiseClone (Inherited from Object.)
Public method ParseDate Returns a SimpleDate object as an output parameter that represents the specified date string in the specified format.
Public method ParseMonthDayDate Returns a SimpleDate object as an output parameter that represents the specified date string and uses the current MonthDayPattern format.
Public method ParseShortDate Returns a SimpleDate object as an output parameter that represents the specified date string and uses the current ShortDatePattern format.
Public method ParseTime Returns a DateTime object as an output parameter that represents the specified time string in the specified format.
Public method ToString (Inherited from Object.)

Top

See also

Reference

DateOptions class

Microsoft.SharePoint.Utilities namespace