Table of Contents

9 时间段语法

概述

要设置时间段,必须使用以下格式:

d-d,hh:mm-hh:mm
Copy
✔ Copied

其中符号代表以下内容:

符号 描述
d 星期几: 1 - 星期一, 2 - 星期二 ,... , 7 - 星期日
hh 小时: 00-24
mm 分钟: 00-59

可以使用分号 (;) 分隔符指定多个时间段:

d-d,hh:mm-hh:mm;d-d,hh:mm-hh:mm...
Copy
✔ Copied

将时间段不做配置时等于 01-07,00:00-24:00,这是默认值。

不包括时间段的上限。因此,如果您指定 09:00-18:00,则时间段中包含的最后一秒是17:59:59。

示例

工作时间。周一至周五 9:00 到18:00:

1-5,09:00-18:00
Copy
✔ Copied

工作时间加上周末。周一至周五9:00 到18:00 和周六、周日10:00 到 16:00:

1-5,09:00-18:00;6-7,10:00-16:00
Copy
✔ Copied
To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.