SharePoint Site "Regional Settings"功能与CSOM的对应
发布日期:2021-09-03 20:14:08 浏览次数:2 分类:技术文章

本文共 1484 字,大约阅读时间需要 4 分钟。


博客地址:

SharePoint网站中的区域设置:"Regional Settings",可以用CSOM通过Site的一些属性去设置它。

Time Zone部分:

Specify the standard time zone.

对应的属性为:web.RegionalSettings.TimeZone

TimeZone类型属性,示例如下:

web.RegionalSettings.TimeZone = web.RegionalSettings.TimeZones.GetById(80);

Region部分:

Locale

Select a locale from the list to specify the way the site displays numbers, dates, and time.

对应的属性为:web.RegionalSettings.LocaleId

整型,设置相应的语言ID即可。

Sort Order

Specify the sort order.

对应的属性为:web.RegionalSettings.Collation

短整型

Set Your Calendar

Specify the type of calendar.

对应的属性为:web.RegionalSettings.CalendarType和web.RegionalSettings.ShowWeeks

短整型和布尔类型

Enable An Alternate Calendar

Specify a secondary calendar that provides extra information on the calendar features.

对应的属性为:web.RegionalSettings.AlternateCalendarType

短整形,默认None的值为0

Define Your Work Week

Select which days comprise your work week and select the first day of each work week.

对应的属性为:web.RegionalSettings.WorkDays、web.RegionalSettings.FirstDayOfWeek、web.RegionalSettings.FirstWeekOfYear、web.RegionalSettings.WorkDayStartHour和web.RegionalSettings.WorkDayEndHour。

均为短整型。

WorkDays中,周日为64、周一为32、周二为16、周三为8、周四为4、周五为2、周六为1。属性值为按位或运算,比如周三和周五即为8|2=10。

FirstDayOfWeek和FirstWeekOfYear为Index,从0开始按顺序与选项对应。

WorkDayStartHour和WorkDayEndHour为分钟数,如上午8:00为480,注意这里只能为60的整数倍,并且如果超过1440会被置为0点。

Time Format

Specify whether you want to use 12-hour time format or 24-hour format.

对应的属性为:web.RegionalSettings.Time24

布尔类型,标识是否采用24小时制。

以上就是区域设置相关的CSOM属性,可以用来方便地获取与设置网站的区域设置。




转载地址:https://blog.csdn.net/weixin_34194702/article/details/90127545 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:arcgis api for flex 开发入门(六)identify
下一篇:Javascript实现简单的富文本编辑器

发表评论

最新留言

不错!
[***.144.177.141]2024年04月06日 22时53分53秒