"…"comments.
Legend:
|separates alternatives.
[and
]bracket optional components.
{and
}bracket optional repeatable components.
Symbol | Definition | Comment |
---|---|---|
time_domain | ||
<time_domain> |
<fallback_group>
{ ||<fallback_group> } |
[1] |
<fallback_group> |
<rule_sequence>
{ ;<rule_sequence> } |
|
<rule_sequence> |
[ <calendar_ranges> :] <basic_rule> { ;<basic_rule> } |
[2] |
Basic rule | ||
<basic_rule> |
<times_for_days> { ,<times_for_days> } |
[3] |
<times_for_days> |
24/7 |
→ open |
open[ <comment> ] |
||
closed[ <comment> ] |
→ closed | |
unknown[ <comment> ] |
→ unknown | |
<comment> | ||
<day_list> off |
→ closed | |
[ <day_list> ] <times> | → open | |
[ <day_list> ] <times> open[ <comment> ] |
||
[ <day_list> ] <times> closed[ <comment> ] |
→ closed | |
[ <day_list> ] <times> unknown[ <comment> ] |
→ unknown | |
[ <day_list> ] <times> <comment> | ||
Days | ||
<day_list> |
<day_or_days> { ,<day_or_days> } |
or |
<day_or_days> | [ <weeks> ] { <holiday> } <days> | |
[ <weeks> ] { <holiday> } <holiday> [ ±<number> days] |
||
<holiday> |
SH| PH |
|
<days> | <wday> | [4] |
<wday> -<wday> |
||
<wday> [<nth_entry> { ,<nth_entry> } ] |
||
<mday> | ||
<mday> -<mday> |
||
<mday> -<mday> /<number> |
[5] | |
<nth_entry> | <nth> | |
<nth> -<nth> |
||
-<nth> |
||
<nth> |
1| 2| 3| 4| 5 |
|
<weeks> |
week<week> { ,<week> } |
or |
<week> | <weeknum> | |
<weeknum> -<weeknum> |
||
<weeknum> -<weeknum> /<number> |
[5] | |
Times | ||
<times> |
<timespan> { ,<timespan> } |
or |
<timespan> | <time> | |
<time> + |
[6] | |
<time> -<time> |
[7] | |
<time> -<time> + |
||
<time> -<time> /<minute> |
[8] | |
<time> -<time> /<hour_minutes> |
||
<time> | <hour_minutes> | <variable_time> | |
<variable_time> | <event> | |
<event> +<hour_minutes> hours |
||
<event> -<hour_minutes> hours |
||
<event> |
sunrise| sunset| … |
|
Calendar | ||
<calendar_ranges> |
<calendar_days> { ,<calendar_days> } |
or |
<comment> | [9] | |
<calendar_days> | [ <year> ] <month> | |
[ <year> ] <month> -<month> |
||
[ <year> ] summer |
[10] | |
[ <year> ] winter |
||
<date_with_offsets> | [11] | |
<date_with_offsets> + |
[12] | |
<date_with_offsets> -<date_with_offsets> |
[13] | |
<date_with_offsets> |
<date> [ ±<wday> ] [ ±<number> days] |
[14] |
<date> | [ <year> ] <month> <daynum> | |
[ <year> ] <month> <wday> [[ -] <nth> ] |
||
[ <year> ] <variable_date> | ||
<daynum> | [15] | |
<variable_date> |
easter| … |
|
Basic elements | ||
<wday> |
Su| Mo| Tu| We| Th| Fr| Sa |
|
<weeknum> |
01| 02| 03| 04| 05| 06| 07| 08| 09| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| 49| 50| 51| 52| 53 |
|
<month> |
Jan| Feb| Mar| Apr| May| Jun| Jul| Aug| Sep| Oct| Nov| Dec |
|
<daynum> |
01| 02| 03| 04| 05| 06| 07| 08| 09| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31 |
|
<mday> |
01.| 02.| 03.| 04.| 05.| 06.| 07.| 08.| 09.| 10.| 11.| 12.| 13.| 14.| 15.| 16.| 17.| 18.| 19.| 20.| 21.| 22.| 23.| 24.| 25.| 26.| 27.| 28.| 29.| 30.| 31. |
|
<hour_minutes> |
<hour>:<minute> |
|
<hour> |
00| 01| 02| 03| 04| 05| 06| 07| 08| 09| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24 |
|
<minute> |
00| 01| 02| 03| 04| 05| 06| 07| 08| 09| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| 49| 50| 51| 52| 53| 54| 55| 56| 57| 58| 59| 60 |
|
<comment> |
"{Any character except "and ;} " |
open.
In discussion !
was proposed as not
operator;
obviously intended was a shortcut-or
.
Tentatively I introduces ||
:
one will not type it by chance, it exhibits the cut very good,
and every programmer will understand it immediately.
basic_rule
is applicable to a day on a all-or-nothing base.
The result of evaluating a rule_sequenz
is the result of the last rule,
which is applicable to the particular day.
basic_rule
are additive:
the comma between the components is read as and also.
Su
represents all sundays,
Su[1]
represents the first sunday of a month,
Su[-1]
represents the last sunday of a month.
cron
and enables to express in even weeksor
on odd days.
Open end: the opening time starts at the given time with
open end. This kind of indication is used quite often; but of course it is impossible to evaluate it verbatim. I evaluate this notation as
plus 4 hours, but no later than midnight.
10:00-16:00/90
and
10:00-16:00/1:30
are evaluated as from ten am to four pm every 1½ hours. Especially departure times can be written very concise and compact using this notation. The interval time following the
/is valid but ignored for opening_hours.
:.
summerand
winterquite often.
summerto
May-Octand
winterto
Nov-Apr.
true
of the date to check equals this day, to false
otherwise.
Until further notice: the calendar range starts at this date and has no upper limit.
true
, if from-date ≤ day-to-check ≤ to-date holds.
Evaluates to true
, if from-date > to-date holds, year is not specified and
either day-to-check ≤ from-date or day-to-check ≧ to-date holds.
Evaluates to false
otherwise.
+ Su
selectes the first Sunday after this calendar day,
the notation - Su
selectes the last Sunday before this calendar day.