Page History
Page properties | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
On this page
|
UI Text Box | ||||
---|---|---|---|---|
| ||||
Each calendar configuration is highly flexible but the underlying specification must follow a dedicated syntax. |
JWT calendars elements and syntax
A calendar is a system on which JWT will be able to do time calculations. Each calendars should be composed of at least one time specifier.
Time specifiers
A time specifier is composed of a time definition and a block in the following format:
Code Block |
---|
<time_definition> { <block_content> } |
Time definition
Defines a part of the time continuum (a set of real numbers).
Block
A block is written between braces {} and defines a scope where the lower level time specifiers can be written.
Levels
Time specifiers are ordered in five hierarchical levels:
- Global
- Year
- Month
- Week
- Day
UI Text Box | ||
---|---|---|
| ||
A time specifier of a particular level is always explicitly or implicitly contained in a time specifier of the immediately higher level. When the higher level time specifier is not configured, then it is implicitly contained in an unrestricted higher level time specifier. |
Priority
Time specifiers each have a dedicated priority. In case that two or more time specifiers overlap in the same level, the one with the highest priority is applied.
Time specifiers with the same priority in the same level are not allowed to overlap, i.e., the intersection of their time definitions must be empty.
Category
Time specifiers can be classified into two categories:
Absolute: Defines the unique and specific parts of the time continuum. This category of time specifiers represents the ones in the global level.
Code Block | ||
---|---|---|
| ||
2020/03/25 #this is a unique an specific date |
Relative: Define parts of the time in the context of other time specifiers. The definition depends on the time specifier where it is contained. This category of time specifiers is contained in the all levels besides the global.
Code Block | ||
---|---|---|
| ||
FRI { 08:00 - 15:00; #the time specifier depends on the "container". In this a day of the week, which is Friday. } |
Comments
JWT calendars supports single-line comments. Comments begin with a #. e.g.:
Code Block | ||
---|---|---|
| ||
#Summer Calendar |
Time specifier overview
The following table represents all the available time specifiers ordered by level and priority:
High priority | Medium priority | Low priority | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Level | ||||||||||||||||||
Global | Date list
| Date
| Year list
| |||||||||||||||
Year | Month-Day list
| Month-day
| Month list
| |||||||||||||||
Day | Whole day
| Time
| Empty
| |||||||||||||||
Month | Day of month list
| |||||||||||||||||
Week | Day of Week List
|
Anchor | ||||
---|---|---|---|---|
|
Get some inspiration by looking at the example specifications below.
Calendar | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Any date-time with time part between 08:00 and 15:00, or 16:00 and 20:00.
| ||||||||||||||
| Mondays to Fridays from 08:00 to 15:00 and from 16:00 to 20:00. | ||||||||||||||
|
| ||||||||||||||
|
| ||||||||||||||
| This calendar additionally contains a specification for:
| ||||||||||||||
| This example combines two calendars. A future calendar coming into effect on December 1st of 2021 and the currently valid calendar.
|
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|