共用方式為


DateOptions Constructor (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.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub New ( _
    localeId As String, _
    calendar As SPCalendarType, _
    workWeek As String, _
    firstDayOfWeek As String, _
    hijriAdjustment As String, _
    timeZoneSpan As String, _
    selectedDate As String _
)
'Usage
Dim localeId As String
Dim calendar As SPCalendarType
Dim workWeek As String
Dim firstDayOfWeek As String
Dim hijriAdjustment As String
Dim timeZoneSpan As String
Dim selectedDate As String

Dim instance As New DateOptions(localeId, _
    calendar, workWeek, firstDayOfWeek, _
    hijriAdjustment, timeZoneSpan, selectedDate)
public DateOptions(
    string localeId,
    SPCalendarType calendar,
    string workWeek,
    string firstDayOfWeek,
    string hijriAdjustment,
    string timeZoneSpan,
    string selectedDate
)

Parameters

  • localeId
    Type: System.String

    A string that contains the locale identifier, for example “1033”.

  • workWeek
    Type: System.String

    A string that contains the seven-character string that indicates the work days in a week, where 1 is a work day and 0 is not a work day; for example, "0111110" represents a Monday–Friday work week for a week whose first day is Sunday.

  • firstDayOfWeek
    Type: System.String

    A string that contains a numeric value that represents the first day of the week displayed in the calendar. The valid value range is 0 through 6; 0 indicates Sunday, 1 indicates Monday, and so on.

  • hijriAdjustment
    Type: System.String

    A string that contains a numeric value that represents the number of days to add to 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 or regions. The valid values are -2, -1, 0, 1, and 2.

  • timeZoneSpan
    Type: System.String

    A string that describes a TimeSpan, which is used as the zone offset from UTC.

  • selectedDate
    Type: System.String

    A string that contains the currently selected calendar date.

See Also

Reference

DateOptions Class

DateOptions Members

DateOptions Overload

Microsoft.SharePoint.Utilities Namespace