共用方式為


SPRegionalSettings.AdjustHijriDays property

取得或設定擴大或縮小回曆行事曆目前月份的天數。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Property AdjustHijriDays As Short
    Get
    Set
'用途
Dim instance As SPRegionalSettings
Dim value As Short

value = instance.AdjustHijriDays

instance.AdjustHijriDays = value
public short AdjustHijriDays { get; set; }

Property value

Type: System.Int16
16 位元整數,會指定的天數。

Examples

下列程式碼範例會透過 1 來減少本月回曆行事曆中的網站。

Dim siteCollection As New SPSite("https://localhost")
Try
    Dim rootWebSite As SPWeb = siteCollection.RootWeb
    Dim regionalsettings As SPRegionalSettings = rootWebSite.RegionalSettings
    regionalsettings.AdjustHijriDays = - 1

    rootWebSite.Update()

    rootWebSite.Dispose()
Finally
    siteCollection.Dispose()
End Try
using (SPSite oSiteCollection = new SPSite("https://localhost"))
{
    using(SPWeb oWebsiteRoot = oSiteCollection.RootWeb)
    { 
        SPRegionalSettings oRegionalSettings = oWebsiteRoot.RegionalSettings; 
        oRegionalSettings.AdjustHijriDays = -1; 
        oWebsiteRoot.Update(); 
    }
}
注意事項注意事項

Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

請參閱

參照

SPRegionalSettings class

SPRegionalSettings members

Microsoft.SharePoint namespace