Page History
Page properties | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Tech review |
| |||||||
Style guide |
| Page status | ||||||
Status | ||||||||
colour | Green | |||||||
title | complete |
Status | ||
---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
On this page
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
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. Each calendar configuration is highly flexible but the underlying specification must follow a dedicated syntax. |
Time specifiers
A simple time specifier is composed of a time definition or frame and a block in scope definition in the following format:
Code Block |
---|
<time_definition><frame> { <block_content> } |
A system on which JWT will be able to do time calculations. Each calendars should be composed of at least one time specifier.
A time specifier is composed of a time definition and a block in the following format: <time_definition> { <block_content> }
<scope>; } #e.g. JAN-MAR {08:00 - 12:00;} |
Frame definition
Defines the time frame to be included in the specification (e.g. JAN-MAR).
Scope definition
The scope definition further refines a time frame. Multiple time definitions and scopes can be specified and nested based on their hierarchy level.
Each scope needs to be ended with a ";".
Hierarchy levels
Time specifiers are ordered in five hierarchical levels
- Time definition: Defines a part of the time continuum (a set of real numbers).
- Block: Is written between braces {} and defines a scope where the lower level time specifiers can be written.
:
- 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 (e.g. a day is contained in a month). When the higher level time specifier is not configured (e.g. no month defined) , then it is implicitly contained in an unrestricted higher level time specifier . |
(e.g. year). |
UI Expand | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
|
Absolute vs. relative time fames
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 and specific date |
Relative
Define parts of the time in the context of other time specifiers
, i.e., the actual part of the time continuum defined. 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
Comment:JWT calendars supports single-line comments. Comments begin with a #. e.g.:
Code Block | ||
---|---|---|
| ||
#Summer Calendar |
Examples and syntax details
UI Expand | ||||
---|---|---|---|---|
| ||||
The following table represents all the available time specifiers ordered by level and |
priority.
|
|
|
|
|
|
UI Text Box | ||
---|---|---|
| ||
Can contain intervals. |
|
|
|
|
type | note |
---|
|
|
|
|
|
|
JAN-MAR,
|
|
UI Text Box | ||
---|---|---|
| ||
Can contain intervals. |
|
|
|
;
UI Text Box | ||
---|---|---|
| ||
Used for defining holidays. |
1, 15, 30
1-5, 15, 25-3
1, 15-31
25-5
|
|
|
MON-THU
MON-WED, FRI
MON, WED, FRI
SAT-MON, WED
Anchor | ||||
---|---|---|---|---|
|
UI Text Box | ||
---|---|---|
| ||
Can contain intervals. |
UI Expand | |
---|---|
|
| |
Get some inspiration by looking at the example specifications below. |
Examples
|
|
|
|
|
|
|
|
For the rest of the year, Mondays to Thursdays from 08:00 to 15:00 and from 16:00 to 20:00. Fridays from 08:00 to 15:00.
type | info |
---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UI Expand | |||||
---|---|---|---|---|---|
| |||||
<schedule> ::= <global_level_specifier> + <global_level_specifier> ::= <date_interval_list> <year_level_specifier> ::= <month_day_list> <month_level_specifier> ::= <day_of_month_list> <week_level_specifier> ::= <day_of_week_list> <day_level_specifier> ::= <time_interval_list> <time_interval_list> ::= <time_interval> ( <time_interval> ::= <time_literal> <time_literal> examples: <date_interval_list> ::= <date_interval> ( <date_list> ::= (<date_literal> | <date_interval>) ( <date_interval> ::= <date_literal> <date_literal> examples: <year_list> ::= (<year> | <year_interval>) ( <year_interval> ::= <year> <year> examples: <month_day_list> ::= <month_day> ( <month_day_interval_list> ::= <month_day_interval> ( <month_day_interval> ::= <month_day> <month_day> ::= <month> <month_list> ::= (<month> | <month_interval>) ( <month> ::= <day_of_month_list> ::= (<day_of_month> | <day_of_month_interval>) ( <day_of_month_interval> ::= <day_of_month> <day_of_week_list> ::= (<day_of_week> | <day_of_week_interval>) ( <day_of_week> ::= |
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Page properties | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
|