Share via


SPRegionalSettings.AdjustHijriDays property

Gets or sets the number of days to extend or reduce the current month in Hijri calendars.

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

Syntax

'Declaration
Public Property AdjustHijriDays As Short
    Get
    Set
'Usage
Dim instance As SPRegionalSettings
Dim value As Short

value = instance.AdjustHijriDays

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

Property value

Type: System.Int16
A 16-bit integer that specifies the number of days.

Examples

The following code example reduces the current month in the Hijri calendar for a Web site by 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(); 
    }
}

Note

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.

See also

Reference

SPRegionalSettings class

SPRegionalSettings members

Microsoft.SharePoint namespace