SPRegionalSettings.FirstDayOfWeek Property
Gets or sets the first day of the week used in calendars on the server.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Property Value
Type: System.UInt32An unsigned 32-bit integer that indicates the first day of the week. The following values are possible:
0 -- Sunday
1 -- Monday
2 -- Tuesday
3 -- Wednesday
4 -- Thursday
5 -- Friday
6 -- Saturday
The following code example sets the first day of the week that is used in calendars to Thursday.
using (SPSite oSiteCollection = new SPSite("http://localhost")) { using (SPWeb oWebsiteRoot = oSiteCollection.RootWeb) { SPRegionalSettings oRegionalSettings = oWebsiteRoot.RegionalSettings; oRegionalSettings.FirstDayOfWeek = 4; 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. |
Note