Technical Concepts > About Feature Layer > GDF 5.0 Time Domains

GDF 5.0 Time Domains

Basic Time Domain Description

In general, a Time Domain is composed of a Starting Date and/or a Time Duration with the following notation:

'[' and ']' are mandatory, and exactly one of each shall be used to encase a basic Time Domain.

A time domain expression may contain any number of space and line break characters either side of its syntax elements '[', '(', ')','{','}',']', '-','+', '*', as well as the various time terms. Time terms themselves, as the inner elements, shall not be broken up.

Example: (M5d1){d1}], or likewise [(M5 d1) {d1}], means:

Alternatively a basic Time Domain may be composed of a Starting Date and an Ending Date with the following notation:

Example: (M5d1)(M5d2)] means:

Special cases of a Time Domain are:

It is specific for each time domain-related Attribute Type whether the general syntax or one of the two special cases mentioned is appropriate for representing the respective time domain value. Note that both special cases have mandatory encasing brackets.

For time domain attributes which expect both start date and duration, it is possible to provide only a start time, and the missing of the duration signifies an implicit "always" (post the Starting Date). When both are expected, a start date is mandatory (i.e. having only duration would be "wrong").

Minus signs '-' play also special role within the time syntax. A minus sign may precede the duration component, which changes the duration semantics into a negative duration: that is duration which "clocks backwards". A minus sign may precede a solitary start term (without a duration clause) when both where expected, and so the "always" duration implied (as in above) becomes "negative always",which then would read "always until the start time". There are other uses of minus signs within either term (those are explained in their respective sections) and there are minus signs used in compound time expressions (and those are explained in that section).

Starting Date and Ending Date syntax

Introduction

Starting Dates and Ending Dates are defined by means of a set of graphical symbols allowing the description of "sharp" time terms: years, months, weeks, days, and so on down to the smallest time unit which is the second. Following afterwards are the "fuzzy" times, times which do not have a universal definition. Times, which while well defined, behave differently in different places and different times. The symbols shall be organised in a sequential order starting with the longest time unit, decreasing towards the smallest, and ending with the fuzzy time units. Valid symbol combinations are shown in Figure D.1. Note that (explicit) fuzzy time units overrule the (implicit) default reference time frame of a given sharp time unit (see D.2.3.1).

Next to the regular start-duration notation of fuzzy time unit constructions, a shorthand notation is allowed, for which examples are provided in D.4.3.

Each particular symbol is composed of a time type code which indicates a particular time unit (e.g. y for year) and a certain number of digits which represent the time values (up to 4 digits). The placeholders for these values use n's or x's, respectively, to indicate the maximum number of digits. Values from the allowable value domain may use fewer than the total of the indicated number of digits, leading to shorter time symbols. As the range of year values starts at 1000, always four digits shall be specified.

Sharp Time Terms

Year

ynnnn

Defines a particular year. E.g., (y1991) means the year 1991. When no more information is given, (y1991) means 1st of January 1991 at 0: 00: 00 am.

Month

Mnn

Defines a particular month within a particular year, or any year when no "y" information is given. The domain runs from 1 to 12, meaning January and December respectively. (M5) means every 1st of May at 0: 00: 00 am, whatever the year may be.

Week

wnn

Defines a week within a previously defined year, or any year when no "y" information is given. The domain runs from 1 to 53 indicating week number 1 and week number 53 respectively. Week number 1 will often be a partial week (in years which do not start on a Sunday), as will week number 53 (in years which do not end on Saturday). Note that the begin of week number one may fall into the previous year; likewise, a weekday towards the end of week number 53 may fall into the subsequent year. Furthermore, note that the week numbering may deviate from commonly applied week numbering schemes. The 'wnn' symbol may be preceded by a minus sign ('-wnn'). I.e. weeks which begin counting before the beginning of the year context (which is equivalent to weeks being counted backwards from the end of the previous year). In such a case, the (negative) count points to the begin of the last, last but one, etc. week in the previous year (or any year, as governed by the year context). Note that w1 and -w1 may resolve to the same week, comprising a set of 7 weekdays either side of New Year of the year context.

Day

Four different time type codes for a "Day" are defined. The code which shall to be used depends on whether a particular day in a month, a particular day of the week or a day in a particular week of a month needs to be represented.

dnn

Defines a particular day within a particular month if previously defined with the "M" format. When no month information is given, (dnn) means the nnth day in any month.

Example: (...d14) means the 14th day in the previously defined month (if any), in the previously defined year (if any) at 0: 00:00 am.

The domain runs from 1 to 28, 29, 30 or 31, depending on the month.

The 'dnn' symbol may be preceded by a minus sign ('-dnn' which stands for days counted backwards from the beginning of the month).

Example: (...-d14) means the 14th day backwards from the beginning of the previously defined month (if any), in the previously defined year (if any) at 0: 00: 00 am.

A more specific example would be:

Example: M5-d14) which means April 17 at 0: 00: 00 am (any year).

tn

Defines a particular weekday in a previously (if any) defined week. The tn symbol may repeat, as such allowing to specify multiple weekdays in a single basic Time Domain. Domain of values is the following: 1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday, 7: Saturday and 8:Public Holiday.

Example: (M5t2) means each Monday in the 5th month (May) of any year, at 0: 00: 00 am.

Example: t2t4) means each Monday and Wednesday, in any month of any year, at 0: 00: 00 am.

fxn

Defines a particular weekday in a previously (if any) defined month, with the following rules:

n is used as in the "t" format with the same domain of values (except for 8), 1: Sunday up to 7: Saturday. For "x" one of the following values shall be substituted: 1: first, 2: second, 3: third, 4: fourth, and 5: fifth.(Note that "the fifth" may not be applicable for certain months/ weekday combinations).

Example: (...f12) means the first Monday at 0: 00: 00 am.

lxn

Defines a particular weekday in a previously (if any) defined month, with the following rules:

n is used as for the "t" format with the same domain of values (except for 8), 1: Sunday up to 7: Saturday. x shall be chosen from the following set: 1: last, 2: last but one, 3: last but two, 4: last but three, and 5: last but four. (Note that "the last but four" may not be applicable for certain months/weekday combinations).

Example: (...l12) means the last Monday at 0: 00: 00 am.

Hour

hnn

Defines a particular hour within a particular day (if previously defined). When no day is specified, it means that every day is valid. The domain runs from 0 to 23.

Example: (d12h6) means every 12th day of a month at 6: 00: 00 am.

The 'hnn' symbol may be preceded by a minus sign ('-hnn' which stands for hours counted backwards from midnight from the beginning of the previously defined day (if any), within the previously defined context (if any)).

Example: (d12-h3) means every 11th day of a month at 9: 00: 00 pm.

Minute

mnn

Defines a particular minute within a particular hour (if previously defined). When no hour is defined, it means that any hour is valid. The domain runs from 0 to 59.

Example: (d12h6m30) means every 12th day of a month at 6: 30: 00 am.

The 'mnn' symbol may be preceded by a minus sign ('-mnn' which stands for minutes counted backwards from the beginning of the previously defined hour (if any), within the previously defined context (if any)).

Example: (d12h6-m15) means every 12th day of a month at quarter of 6:00:00 am or 5:45:00am.

Second

snn

Defines a particular second within a particular minute (if previously defined). When no minute is specified, it means that any minute is valid. nn domain is from 0 to 59.

Example: (d12h6m30s52) means every 12th day of a month at 6: 30: 52 am.

The 'snn' symbol may be preceded by a minus sign ('-snn' which stands for seconds counted backwards from the beginning of the previously defined minute (if any), within the previously defined context (if any)).

Example: (d12h6m31-s8) means every 12th day of a month at 6: 30: 52 am.

Fuzzy Time Terms

Fuzzy Time Term

znn

Defines a fuzzy time term within the preceding sharp time (for any symbols equal or greater than the applicable reference time frame, if previously specified) and/or which serves as context for predefined sharp time (for any symbols smaller than the applicable reference time frame, if previously specified). When no previous time is specified, it means that any occurrence of the fuzzy term is valid.

Example: (z15) means the beginning of peak hours on any day in any month in any year

Example: (M12z15) means the beginning of peak hours in December in any year.

Sharp symbols like dnn, hnn, mnn, etc may evaluate relative to a fuzzy context, if their default reference time frame is not present.

Example: (d3s5) means beginning of third day of winter (default context for dnn would be day of month)

Example: (-m30z15) means 30 minutes before beginning of peak hours (default context for mnn would be hour in a day).

The 'znn' symbol may be preceded by a minus sign ('-znn'); unlike for sharp time symbols, the minus sign alters the symbol semantics from 'starts (or ends) at beginning of' to 'starts (or ends) at end of'.

Example: (M12-z15) means the end of peak hour in December in any year

Example: (-m30-z15) means 30 minutes before end of peak hour

Summarising table of all "sharp" symbols

time unit reference time frame notation value domain explanation of values
Year ynnnn 1000...9999 any year
Month in a Year* Mnn 1...12 January, February, etc. to December
Week in a Year* (-)wnn 1...53
Day in a Month* (-)dnn 1...28/29/30/31 Maximum value depends on the month
Day of the Week tn 1...8 Sunday(=1) to Saturday (=7), and Public Holiday (=8)
Weekday in a Month fxn x: 1...5 first, second, etc. weekday of the month
n: 1...7 Sunday to Saturday
Weekday in a Month lxn x: 1...5 last, last but one, etc. weekday of the month
n: 1...7 Sunday to Saturday
Hour of the day* (-)hnn 0...23 24 hours format
Minute of an hour* (-)mnn 0...59
Second of a minute (-)snn 0...59

* Sharp symbol may evaluate relative to an applicable fuzzy context, if their default reference time frame is not present.

Summarising table of "fuzzy" symbols

time unit reference time frame notation value domain explanation of values
(terms in parenthesis apply when minus in use)
External Any (-)z0 Starting/ending (at the end) of a period controlled by external device. Devices in the Korean city of Kwatchen which use digital signs to control flow of traffic. Ramps which regulate access by means of centralised traffic control in the US.
Sunrise Within a day (-)z1 Starts/ends at Sunrise (Sunset)
Sunset Within a day (-)z2 Starts/ends at Sunset (Sunrise)
School Within a year, week, or day (-)z3 Starts/ends at (the end of) any school period (date and hour)
Holiday Within a year (-)z4 Starts/ends at (the end of) any Holiday
Winter Within a year (-)z5 Beginning/ending of (the end of) Winter
Spring Within a year (-)z6 Beginning/ending of (the end of) Spring
Summer Within a year (-)z7 Beginning/ending of (the end of) Summer
Autumn Within a year (-)z8 Beginning/ending of (the end of) Autumn
High Tide Within a day (-)z9 Starts/ends at (the end of) High Tide
Low Tide Within a day (-)z10 Starts/ends at (the end of) Low Tide
High Water Within a year (-)z11 Starts/ends at (the end of) River High Water
Low Water Within a year (-)z12 Starts/ends at (the end of) River Low Water
Wet Season Within a year (-)z13 Starts/ends at (the end of) Wet Season (Rainy Season)
Dry Season Within a year (-)z14 Starts/ends at (the end of) Dry Season
Peak Hours Within a year, month,week, or a day (-)z15 Starts/ends at (the end of) Peak Hours: Peak hours include rush hour and activity/ scheduled event based times. These would vary by location and by season. Peak hours are applicable not only to road networks but ferries as well. Activities like shopping, beach going, and skiing. Scheduled events like parades, sporting events, concerts, conventions.
Off-Peak Hours Within a year, month, week, or a day (-)z16 Starts/ends at (the end of) Off-Peak Hours
Rain/wet conditions Any (-)z17 Starts/ends at (the end of) Rain/wet conditions
Snow Any (-)z18 Starts/ends at (the end of) Snow
Fog Any (-)z19 Starts/ends at (the end of) Fog
Dust Any (-)z20 Starts/ends at (the end of) Dust
Dawn Within a day (-)z21 Starts/ends at (the end of) Dawn
Dusk Within a day (-)z22 Starts/ends at (the end of) Dusk
User Defined Any (-)z23-
(-)z49 User Defined Starting/ending Fuzzy types

Summarising table of TomTom "User Defined" symbols

Time Domain Description Comment
[(z1){z51}] Sunrise till Sunset
[(z10){z60}] Low Tide
[(z11){z61}] High Water
[(z12){z62}] Low Water
[(z13){z63}] Wet Season
[(z14){z64}] Dry Season
[(z16){z66}] Off-Peak Hours not on Rush Hours
[(z17){z67}] Rain/Wet conditions
[(z18){z68}] Snow
[(z19){z69}] Fog
[(z2){z52}] Sunset till Sunrise
[(z21){z71}] Dawn
[(z22){z72}] Dusk
[(z23){z73}] Evening
[(z24){z74}] Night
[(z25){z75}] Event regularly parades or sport events, not a one day or weekend event
[(z26){z76}] Undefined Occasion time domains that cannot be categorised
[(z27){z77}] Pollution used by governments to issue a special limitation on traffic flow, speed limits,... when a certain level of atmospheric pollution is met. E.g. in Athens cars with odd registration number sill then not be allowed to drive on even days: i.e. Direction of Traffic Flow "Closed in Both Directions" for Validity Period "Pollution"
[(z28){z78}] Race Days Automobile racing, horse racing, etc.
[(z3){z53}] School days
[(z30){z80}] Morning Rush Hour
[(z31){z81}] Evening Rush Hour
[(z32){z82}] Morning
[(z33){z83}] Afternoon
[(z34){z84}] Strong Wind
[(z35){z85}] Hunting Season
[(z36){z86}] When Children are Present
[(z37){z87}] Market hours irregular
[(z38){z88}] Funeral
[(z39){z89}] Military Exercise
[(z4){z54}] Holiday
[(z40){z90}] Avalanche
[(z41){z91}] Business Hours
[(z42){z92}] Tourist Season mainly in summer
[(z43){z93}] School Hours
[(z44){z94}] Non-School Hours
[(z45){z95}] Day
[(z46){z96}] Church Hours
[(z47){z97}] Ski Season
[(z48){z98}] Summer School
[(z49){z99}] Thaw
[(z5){z55}] Winter
[(z6){z56}] Spring
[(z7){z57}] Summer
[(z8){z58}] Autumn
[(z9){z59}] High Tide

Valid format combinations and default values for Starting Dates and Ending Dates

General aspects of the combination of Starting Date and Ending Dates formats

Starting Dates and Ending Dates, which are composed of several time units (e.g. 14th of November 1991), are defined by placing the symbols sequentially in a hierarchical order. However, some constraints have to be taken into account.

Valid symbol combination of starting dates and ending dates

 

A minus sign "-" may precede the 'w', 'd', 'h', 'm', or 's' terms to allow for subtractive values.

A minus sign "-" may precede the 'z' term(s) to toggle between fuzzy term beginning and end as the applicable starting/ending date.

If not all time type codes of a format combination are used (e.g. only a week and an hour are specified), default values are adopted for the undefined time units. For the fuzzy times, the default value is non-presence.

General rule for default values

To find the default value for a particular time unit that is undefined in a Starting Date sequence or Ending Date sequence, respectively, a distinction has to be made whether the missing time type code is a "final" one or not.

Example: (y1994t1) means year 1994, any month/any week, each Sunday (t1), time 00: 00: 00 am.

Example: (w9h11m30) means 9th week of any year, any day in this week, 11:30: 00 am.

Example: (-w9h11m30) means 9th week from the end of (the previous year of) any year, any day in this week, 11:30:00 am

Example: (M4) means any year, 1st of April, time 00: 00: 00 am.

Example: (M4m33) means any year, April, any day of April, any hour at 33 minutes and 0 seconds.

Example: (M4-m27) means any year, April, any day of April, any hour at 33 minutes and 0 seconds.

Example: (y1994t1z1) means Year 1994, any month / any week, each Sunday (t1), at the fuzzy time when Sunrise begins.

Since the fuzzy value of Dawn contains in it the notion of "lower order" sharp, Hours, Minutes, and Seconds are not set to their usual default values.

The other fuzzy values which are missing (such as z13 or z27) are simply ignored and no default value is substituted for them.

Example: (w9z3) means 9th week of any year, any day in this week, at the time at which the school period begins on each of these days (if school is in session on that particular day).

Example: (M4z4) means any year in the Month of April, at each time in which a Holiday begins. If there are no Holidays in the Month of April, this is an empty reference.

Detailed description of possible combinations and default values

y:

If no additional "M, w, d, t, f, l, h, m, s" information is given, the default value is M1d1h0m0s0 for the 1st of January at 0: 00: 00 am in the defined year. The presence of "z" information may change before-mentioned default meanings if "y" is an applicable reference frame for the "z" information at hand.

M:

If no additional "y" information is given, it means that any year is valid. If no additional "d, t, f, l, h, m, s" information is given, the default value is d1h0m0s0 for the 1st day in the defined month at 0: 00: 00 am. The presence of "z" information may change before-mentioned default meanings if "M" is an applicable reference frame for the "z" information at hand. No "w" format can be used in combination with the "M" format.

w:

If no "y" extra information is given, it means any year is valid. If no "t, h, m, s" extra information is given, the implicit value is t1h0m0s0 for Sunday in the defined week at 0: 00: 00 am. The presence of "z" information may change before-mentioned default meanings if "w" is an applicable reference frame for the "z" information at hand. No "M, d, l, f" format can be used in combination with the "w" format.

d:

If no additional "y" and/or "M" information is given, it means that any month and/or any year is valid. If no additional "h, m, s" information is given, the default value is h0m0s0 for 0: 00: 00 am on the defined day. The presence of "z" information may change before-mentioned default meanings if "d" is an applicable reference frame for the "z" information at hand. No "w, t, l, f" format can be used in combination with the "d" format.

t:

If no additional "y" and/or "M" or "w" information is given, it means that any month or any week and/or any year is valid. If no "h, m, s" extra information is given, the default value is h0m0s0 for 0: 00: 00 am on the defined day. The presence of "z" information may change before-mentioned default meanings if "t" is an applicable reference frame for the "z" information at hand. No "d, l, f" format can be used in combination with the "t" format.

f:

If no "y" and/or "M" information is given, it means that any month and/or any year is valid. If no additional "h, m, s" information is given, the default value is h0m0s0 for 0: 00: 00 am on the defined day. The presence of "z" information may change before-mentioned default meanings if "f" is an applicable reference frame for the "z" information at hand. No "w, d, t, l" format can be used in combination with the "f" format.

l:

If no "y" and/or "M" information is given, it means that any month and/or any year is valid. If no "h, m, s" extra information is given, the default value is h0m0s0 for 0: 00: 00 am on the defined day. The presence of "z" information may change before-mentioned default meanings if "l" is an applicable reference frame for the "z" information at hand. No "w, d, t, f" format can be used in combination with the "l" format.

h:

If no "y, M, w, d, t, l, f" information is given, it means that any day is valid. If no "m, s" information is given, the default value is m0s0 in the hour in question. The presence of "z" information may change before-mentioned default meanings if "h" is an applicable reference frame for the "z" information at hand.

m:

If no "y, M, w, d, t, l, f" information is given, it means that any day is valid. If no "h" information is given, it means that any hour in the previously defined day is valid. If no "s" information is given, the default value is s0 in the minute in question. The presence of "z" information may change before-mentioned default meanings if "m" is an applicable reference frame for the "z" information at hand.

s:

If no "y, M, w, d, t, l, f" information is given, it means that any day is valid. if no "h" information is given, it means that any hour in the previously defined day is valid. if no "m" information is given, it means that any minute in the previously defined hour is valid. The presence of "z" information may change before-mentioned default meanings if "s" is an applicable reference frame for the "z" information at hand.

In the list below of fuzzy symbols, symbols numbered z50 and higher correspond to fuzzy duration symbols (see D.3.3), the counterparts of the fuzzy start symbols numbered z0 and higher.

z0,z50:

[External] Since the extent of the time specified externally is not yet determined, it is difficult to assign default values. The "logically correct" behaviour is expected.

z1,z51:

[Sunrise to Sunset] If no "y, M, w, d, t, l, f" information is given, it means that any day applies (either as a start time or as a duration time). "H., m, s" information should not be provided.

z2,z52:

[Sunset to Sunrise] If no "y, M, w, d, t, l, f" information is given, it means that any day applies (either as a start time or as a duration time). "H., m, s" information should not be provided.

z3,z53:

[School] If no "y, M, w, d, t, l, f" information is given, it means that any day when school is in session applies (either as a start time or as a duration time). If "y, M, w, d, t, l, f" information is completely given, and z3 is present, "h, m, s" may not be provided, since z3 is the actual equivalent to the "h, m, s" of the beginning of the time during the day of the school session. If no "y, M, w, d, t, l, f" information is given, and z3 is present, "h, m, s" may be provided. If "h, m, s" information is provided it designates the start time within the school session day already specified.

z4,z54:

[Holiday] If no "y, M, w, d, t, l, f" information is given, it means that any holiday day applies (either as a start time or as a duration time). If "h, m, s" information is provided it designates the start time within the holiday day already specified.

z5,z55:

[Winter] If no "y, d, t, l, f" information is given, it means that any Winter day applies (either as a start time or as a duration time). "M, w" information may not be specified together with z5. If "h, m, s" information is provided it designates the start time within the Winter day(s) already specified.

z6,z56:

[Spring] If no "y, d, t, l, f" information is given, it means that any Spring day applies (either as a start time or as a duration time). "M, w" information may not be specified together with z6. If "h, m, s" information is provided it designates the start time within the Spring day(s) already specified.

z7,z57:

[Summer] If no "y, d, t, l, f" information is given, it means that any Summer day applies (either as a start time or as a duration time). "M, w" information may not be specified together with z7. If "h, m, s" information is provided it designates the start time within the Summer day(s) already specified.

z8,z58:

[Autumn] If no "y, d, t, l, f" information is given, it means that any Autumn day applies (either as a start time or as a duration time). "M, w" information may not be specified together with z8. If "h, m, s" information is provided it designates the start time within the Autumn day(s) already specified.

z9,z59:

[High Tide] If no "y, M, w, d, t, l, f" information is given, it means that any day applies (either as a start time or as a duration time). "h, m, s" information should not be provided.

z10,z60:

[Low Tide] If no "y, M, w, d, t, l, f" information is given, it means that any day applies (either as a start time or as a duration time). "h, m, s" information should not be provided.

z11,z61:

[High Water] If no "y, d, t, l, f" information is given, it means that any High Water day applies (either as a start time or as a duration time). "M, w" information may not be specified together with z11. If "h, m, s" information is provided it designates the start time within the High Water day(s) already specified.

z12,z62:

[Low Water] If no "y, d, t, l, f" information is given, it means that any Low Water day applies (either as a start time or as a duration time). "M, w" information may not be specified together with z12. If "h, m, s" information is provided it designates the start time within the Low Water day(s) already specified.

z13,z63:

[Wet Season] If no "y, d, t, l, f" information is given, it means that any Wet Season day applies (either as a start time or as a duration time). "M, w" information may not be specified together with z13. If "h, m, s" information is provided it designates the start time within the Wet Season day(s) already specified.

z14,z64:

[Dry Season] If no "y, d, t, l, f" information is given, it means that any Dry Season day applies (either as a start time or as a duration time). "M, w" information may not be specified together with z14. If "h, m, s" information is provided it designates the start time within the Dry Season day(s) already specified.

z15,z65:

[Peak Hours] If no "y, M, w, d, t, l, f" information is given, it means that any day is valid. "h, m, s" information should not be provided.

z16,z66:

[Off-Peak Hours] If no "y, M, w, d, t, l, f" information is given, it means that any day is valid. "h, m, s" information should not be provided.

z17, z67:

[Rain/wet conditions] if no "y, M, w, d, t, l, f" information is given, it means that any day is valid. "h, m, s" information should not be provided.

z18, z68:

[Snow] if no "y, M, w, d, t, l, f" information is given, it means that any day is valid. "h, m, s" information should not be provided.

z19, z69:

[Fog] if no "y, M, w, d, t, l, f" information is given, it means that any day is valid. "h, m, s" information should not be provided.

z20, z70:

[Dust] if no "y, M, w, d, t, l, f" information is given, it means that any day is valid. "h, m, s" information should not be provided.

z21,z71:

[Dawn] If no "y, M, w, d, t, l, f" information is given, it means that any day applies (either as a start time or as a duration time). "h, m, s" information should not be provided.

z22,z72:

[Dusk] If no "y, M, w, d, t, l, f" information is given, it means that any day applies (either as a start time or as a duration time). "h, m, s" information should not be provided.

Table of allowed and forbidden format combinations

The following table shows valid combinations of Starting Date formats. For each format A of the first column all possible formats B that can follow in a Starting Date sequence are marked by an "*" in the corresponding line. Since the table is too large to fit on the page in one piece, it is broken down to 4 quadrants.

Example: (M5w1) week 1 in month 5 (May) is not correct, but (y1991w1) week 1 in year 1991 is allowed.

B y M w d t f l h m s
A
y * * * * * * * * *
M * * * * * * *
w * * * *
d * * *
t * * * *
f * * *
l * * *
h * *
m *
s
B z
0
z
1
z
2
z
3
z
4
z
5
z
6
z
7
z
8
z
9
z
10
z
11
z
12
z
13
z
14
z
15
z
16
z
17
z
18
z
19
z
20
z
21
z
22
A
y * * * * * * * * * * * * * * * * * * * * * *
M * * * * * * * * * * * * * *
w * * * * * * * * * * * * * *
d * * * * * * * * * * * * * * * * * * * * * *
t * * * * * * * * * * * * * * * * * * * * * *
f * * * * * * * * * * * * * * * * * * * * * *
l * * * * * * * * * * * * * * * * * * * * * *
h * * * * * * * * * *
m * * * * * * * * * *
s * * * * * * * * * *

Since the 3rd quadrant of this table provides no additional information over the 2nd quadrant, it is omitted from this manuscript.

B z
0
z
1
z
2
z
3
z
4
z
5
z
6
z
7
z
8
z
9
z
10
z
11
z
12
z
13
z
14
z
15
z
16
z
17
z
18
z
19
z
20
z
21
z
22
A
z0
z1 * * * * * * * * * * *
z2 * * * * * * * * * * * * *
z3 * * * * * * * * * * * * * * * * * *
z4 * * * * * * * * * * * * * * * * * *
z5 * * * * * * * * * * * * * * * * *
z6 * * * * * * * * * * * * * * * * *
z7 * * * * * * * * * * * * * * * * * *
z8 * * * * * * * * * * * * * * * * * *
z9 * * * * * * * * * *
z10 * * * * * * * * * *
z11 * * * * * * * * * * * * * * * *
z12 * * * * * * * * * * * * * * * *
z13 * * * * * * * * * * * * * * * *
z14 * * * * * * * * * * * * * * * *
z15 * * * * * * * *
z16 * * * * * * * *
z17 * * * * * * * * * * * * *
z18 * * * * * * * * * * * * *
z19 * * * * * * * * * * * * *
z20 * * * * * * * * * * * * *
z21 * * * * * * * * * * *
z22 * * * * * * * * * * * * *

Starting Date examples

"14th November 1991 (at 0: 00: 00 am)":

(y1991M11d14).

"Every 2nd of May at 5: 31 pm (any year, default second=00)":

(M5d2h17m31).

"Each last Sunday in February (any year, at 0: 00: 00 am)":

(M2l11).

"Monday in week 41 year 1991 (at 0: 00: 00 am)":

(y1991w41t2).

"July 1962 (by default the 1st of July at 0: 00: 00 am)"

(y1962M7).

"Start of High Tide on 14th November 1991":

(y1991M11d14z9).

"Every 2nd day of any month during the Wet Season at 5: 31 pm (any year, default second=00)":

(d2h17m31z63).

"Each last Sunday in February at the onset of Peak Hours (rush hours) (any year, at 0: 00: 00 am)":

(M2l11z15).

"Monday at onset of Dusk during Spring in the year 1991":

(y1991t2z2z56).

Time duration syntax

Introduction

The syntax specified in this sub-clause enables the description of intervals by means of a set of symbols representing the time duration units year, month, week, day, hour, minute, second, and the collection of fuzzy time markers. Together with a starting date, the interval constitutes a basic Time Domain.

The symbols have to be organised in a sequential order starting with the longest time unit, decreasing towards the smallest, and ending with the fuzzy time units. Valid symbol combinations are shown in Figure D.2. Interpretation shall follow this logical sequence from left to right. Despite fuzzy time units always being last in order, the strictly cumulative duration of combined sharp and fuzzy time units may in special cases extend beyond the end of the fuzzy time unit (see D.3.7.5 for an example).

Given that year and month do not have a constant duration, their interpretation in order to determine the effective Ending Date depends on the applicable Starting Date context. As an exception, the impact of occasional UTC leap seconds which are being introduced from time to time (extending the last minute of a particular month by one second) are not taken into account.

The symbol is composed of a duration type code, which indicates a particular time duration unit (e.g. y for year) and up to 2 digits which are destined for the time duration values. Values from the allowable value domain may use a single digit only, leading to shorter time symbols.

If the '{' (which is the start designator of the Time Duration expression) preceded by a minus sign, it means that the cumulative duration is counted in the reverse order. Inside the Time Duration expression, the minus sign applies to single terms.

Sharp Time Terms

Years

ynn:

Defines a duration of nn years.

Example: [(y1991M11d14h5m30s19){y1}] means from 14 November 1991, 5: 30: 19 am to 14 November 1992, 5: 30: 19 am.

If there is no identical calendar date in the year in question, which occurs only for February the 29th, "plus 1 year" leads to February the 28th of the following year. Notice that {y1} = {M12}.

Months

Mnn:

Defines a duration of nn months.

Example: [(y1991M11d14h5m30s19){M3}] means from 14 November 1991, 5: 31: 19 am to 14 February 1992, 5: 30: 19 am.

If there is no identical calendar date in the target month in question, the last day in this month should become the target calendar day.

Example: 31st of January plus 1 month leads to 31st of February, which is not correct. According to the rule mentioned above, 31 January plus 1 month leads to 28 or 29 February depending on the year.

Example: [(y1991M11d14h5m30s19){-M3}] means from 14 November 1991, 5: 30: 19 am backwards to 14 August 1991, 5: 30: 19 am.

Example: [(y1991M11d14h5m30s19)(y1991M8d14h5m30s19)] means from 14 November 1991, 5: 30: 19 am backwards to 14 August 1991, 5: 30: 19 am.

Example: [(y1991M11d14h5m30s19){M1d2}] means from 14 November 1991, 5: 30: 19 am add one month and then add 2 days which yields 16 December 1991, 5: 30: 19 am.

Weeks

wnn:

Defines a duration of nn weeks, i.e. nn*7 days.

Example: [(y1991M11d14h5m30s19){w2}] means from 14 November 1991 at 5: 30: 19 am to 28 November 1991, 5: 30: 19 am. Notice that {w1} = {d7}.

Days

dnn:

Defines a duration of nn days, i.e. nn*24 hours.

Example: [(y1991M11d14h5m30s19){d2}] means from 14 November 1991 at 5: 30: 19 am to 16 November 1991, 5: 30: 19 am. Notice that {d1} = {h24}.

Hours

hnn:

Defines a duration of nn hours, i.e. nn*60 minutes.

Example: [(y1991M11d14h5m30s19){h10}] means from 14 November 1991, 5: 30: 19 am to 14 November 1991 at 3: 30: 19 pm. Notice that {h1} = {m60}.

Minutes

mnn:

Defines a duration of nn minutes, i.e. nn*60 seconds.

Example: [(y1991M11d14h5m30s19){m11}] means from 14 November 1991 at 5: 30: 19 am to 14 November 1991 at 5: 41: 19 am. Notice that {m1} = {s60}.

Seconds

snn:

Defines a duration of nn seconds.

Example: [(y1991M11d14h5m30s19){s21}] means from 14 November 1991 at 5: 30: 19 am to 14 November 1991 at 5: 30: 40 am. Notice that {m1} = {s60}.

Fuzzy Time Terms

Fuzzy Time Term

znnn
: Defines a fuzzy time duration. The domain for nn ranges from 50 to 99 (see D.3.5 for fuzzy time semantics).

Example: {z55} means during Winter.

The 'znnn' symbol may be preceded by a minus sign ('-znnn'); unlike for sharp time symbols, the minus sign alters the symbol semantics to become the complementary.

Example: {-z55} means during non-Winter.

Summarising table of all "sharp" symbols

time
unit
notation Value
domain
substitutions remarks
Year (-)ynn 0...99 If there is no existing identical calendar date in the target year, the last day of the target month will be seen as the target calendar day (can occur for starting date February 29th)
Month (-)Mnn 0...99 {M12} = {y1} If there is no existing identical calendar date in the target month, the last day of this month will be seen as the target calendar day.
Week (-)wnn 0...99
Day (-)dnn 0...99 {d7} = {w1}
Hour (-)hnn 0...99 {h24} = {d1}
Minute (-)mnn 0...99 {m60} = {h1}
Second (-)snn 0...99 {s60} = {m1}

Summarising table of "fuzzy" symbols

time unit Reference time frame notation value domain explanation of values
(terms in parenthesis apply when minus in use)
External Any (-)z50

Duration (complement) period controlled by external device. Devices in the Korean city of Kwatchen which use digital signs to control flow of traffic. Ramps which regulate access by means of centralised traffic control in the US.

Sunrise till Sunset Within a "day" (-)z51 Duration (complement) of Sunrise till Sunset
Sunset till Sunrise Within a "day" (-)z52 Duration (complement) of Sunset till Sunrise
School Within a year, week, or day (-)z53 Duration (complement) of School time (a possibly non contiguous duration)
Holiday Within a year (-)z54 Duration (complement) of Holiday (a possibly non contiguous duration)
Winter Within a "year" (-)z55 Duration (complement) of Winter
Spring Within a "year" (-)z56 Duration (complement) of Spring
Summer Within a "year" (-)z57 Duration (complement) of Summer
Autumn Within a "year" (-)z58 Duration (complement) of Autumn
High Tide Within a "day" (-)z59 Duration (complement) of "High Tide"
Low Tide Within a "day" (-)z60 Duration (complement) of "Low Tide"
High Water Within a "year" (-)z61 Duration (complement) of "River High Water" period
Low Water Within a "year" (-)z62 Duration (complement) of "River Low Water" period
Wet Season Within a "year" (-)z63 Duration (complement) of Wet Season (Rainy Season)
Dry Season Within a "year" (-)z64 Duration (complement) of Dry Season
Peak Hours Within a year, month, week, or a day (-)z65 Duration (complement) of Peak Hours (Rush hours on freeway for instance) (a possibly noncontiguous duration).
Off-Peak Hours Within a year, month, week, or a day (-)z66 Duration (complement) of Off- Peak Hours (a possibly noncontiguous duration)
Rain/wet conditions Any (-)z67 Duration (complement) of Rain/ wet conditions
Snow Any (-)z68 Duration (complement) of Snow
Fog Any (-)z69 Duration (complement) of Fog
Dust Any (-)z70 Duration (complement) of Dust
Dawn Within a "day" (-)z71 Duration (complement) of Dawn
Dusk Within a "day" (-)z72 Duration (complement) of Dusk
User Defined Any (-)z73-(-)z99 User Defined Durations (complement) of Fuzzy types
Always Any (-)z100 Duration of always (never)

Valid format combinations and default values for Time Durations

Combination of periods

Time periods which are composed of several time duration units are represented by listing the individual symbols sequentially in hierarchical order:

Combination of periods

The total time duration of a particular combination of symbols is the sum of all single time intervals.

Example: {y2M1w2} means a period of 2 years, 1 month and 2 weeks.

Example: {y2-M1w2} means a period of 2 years, take away 1 month and then add 2 weeks.

Example: {y2-M1-w2} means a period of 2 years, take away 1 month and then take away (additionally) 2 weeks. Note that the finally 2 weeks subtraction isn't from the 1 month term, but from the entire cumulative term (in a strict left to right deployment).

Default values

The default value for each missing time type value in a sequence of basic time intervals is 0 (zero). The default value for a fuzzy time duration is non-presence.

Time Domain examples

"From 9am to 1pm every day"

Starting date is any year, any month, any day, at 9: 00: 00 am

(h9)

Duration is 4 hours.

{h4}

So that the complete expression is:

[(h9){h4}]

Another way to make an equivalent statement is

[(h13)-{h4}]

As well as

[(h13){-h4}]

Yet another way to make an equivalent statement is

[(h9)(h13)]

"From 19: 30 to 22: 00 every Friday in March"

Starting date is any year, March, any Friday at 7: 30 pm

(M3t6h19m30)

Duration is 2 hours and 30 minutes.

{h2m30}

So that the complete expression becomes:

[(M3t6h19m30){h2m30}]

"Last 5 minutes before New Year 1992"

Starting date is the 1st of January 1992 at 0: 00: 00 am

(y1992) implies the 1st of January at 0: 00: 00 am

Duration is minus 5 minutes.

{-m5}

So that the complete expression becomes:

[(y1992){-m5}]

"From Sunrise to Sunset"

Starting time is any year, any month, any day, at Sunrise

(z1)

Duration is Sunrise to Sunset.

{z51}

So that the complete expression is:

[(z1){z51}]

"From 1 hour before Sunrise to 1 hour after Sunset"

Starting time is any year, any month, any day, an hour before Sunrise

(-h1z1)

Duration is daytime hours plus 2 hour.

{h2z51}

So that the complete expression is:

[(-h1z1){h2z51}]

"From 1 hour before Sunset to 1 hour after Sunset"

Starting time is any year, any month, any day, an hour before Sunset (since a '-' before "point-in-time" fuzzy changes the semantics from "beginning" of it, to the "end" of it (alternative to using z2)

(-h1-z1)

1 hour after Sunset.

(h1-z1)

So that the complete expression is:

[(-h1-z1)(h1-z1)]

A more succinct expression is the following:

[(-h1z2)(h1z2)]

"While school is in session"

Starting time is any year, any school day, at beginning of any school time

(z3)

Duration is school session time.

{z53}

So that the complete expression is:

[(z3){z53}]

Note that "while school is not in session" would be rendered as

[(-z3){-z53}]

"In summer and autumn"

Starting time is any year, at onset of summer day, at midnight

(z7)

Duration is summer and autumn.

{z57z58}

So that the complete expression is:

[(z7){z57z58}]

Note that use of a start offset does not change the effective time domain end:

[(d1z7){z57z58}] means from one day after begin of summer till end of autumn

Furthermore, discontinues fuzzy time domains can be expressed:

[(z6){z56z58}] means all of spring and all of autumn

"During Peak Hours in Winter"

Starting time is any year, in Winter, at the start of any of the Peak Hour periods

(z55z15)

Duration is Peak Hour period.

{z65}

So that the complete expression is:

[(z55z15){z65}]

"A specific time in November"

Starting time is the year of 1991, November the 14th, 5: 30:19 pm

(y1991M11d14h5m30s19)

Duration is 3 months and 3 days.

{M3d3}

So that the complete expression is:

[(y1991M11d14h5m30s19) {M3d3}]

"Another specific time in November"

Starting time is the year of 1991, November the 14th, 5: 30:19 pm

(y1991M11d14h5m30s19)

Duration is 3 days less then 3 months.

{M3-d3}

So that the complete expression is:

[(y1991M11d14h5m30s19) {M3-d3}]

Time Domain combinations and shorthand notations

General aspects

Basic Time Domains may also be combined with set operations, such as:

Union of sets

notation: +

Intersection of sets

notation: *

Subtraction of sets

notation: -

Each set operation(s) of basic Time Domains A, B, C, etc. shall be encased by mandatory brackets ('[' and ']', respectively), leading to allowable cases of composite Time Domains as follows:

[A + B], as well as [A + B + C + " ]

[A * B], as well as [A * B * C * " ]

[A - B]

In hierarchically structured expressions, any composite Time Domain may be subject to further set operations, in turn playing the roles of A, B, C, etc and following the same bracketing rule.

A time domain expression may contain any number of space and line break characters either side of its syntax elements '[', '(', ')','{','}',']', '-','+', '*', as well as the various time terms. Time terms themselves, as the inner elements, shall not be broken-up.

Example

A shop is assumed to be "Open to all users": From 9: 00am to 12: 00am plus from 13: 30 to 19: 00 each day from Monday to Saturday, except each 1st of May, last Tuesday of January for inventory reasons, and during August (holidays).

The way to code this is to attach the Attribute "Opening Period" to the Feature "Shopping Center". The Opening Period refers by means of a Time Domain ID to a corresponding Time Domain Record that contains all opening information.

Because of De Morgan's theorem, A * (B + C) = (A * B) + (A * C), there are many different symbol combinations to represent the same complex Time Domain.

The example described above can be solved by the following combination of basic Time Domains:

"From 9: 00am to 12: 00am" is [(h9){h3}]

"From 13: 30 to 19: 00" is [(h13m30){h5m30}]

"From 9: 00am to 12: 00am and from 13: 30 to 19: 00" becomes:

[[(h9){h3}] + [(h13m30){h5m30}]]

Since this is valid only from Monday to Saturday, an intersection operation is required with the Time Domain "Any week from Monday to Saturday", represented by [(t2){d6}]

The expression now becomes: [[[(h9){h3}] + [(h13m30){h5m30}]] * [(t2){d6}]]

We will now deal with the restrictions:

"1st of May every year", which is represented as [(M5d1){d1}]

"last Tuesday of January" which is represented as [(M1l13){d1}]

"All days during August" which is represented as [(M8){M1}]

The final expression becomes then:

[[[
[[[(h9){h3}] + [(h13m30){h5m30}]] * [(t2){d6}]]
-[(M5d1){d1}]]
-[(M1l13){d1}]]
-[(M8){M1}]
]

Shorthand Expressions for Fuzzy Symbols

Introduction

Following the regular structure of start-duration expressions, use of fuzzy symbols may >necessitate the use of 'intersect' set operations in a frequent number of cases.

Example: [[(d1){d2}] * [(z7){z57}]] means overall the first two days of every month during summer of any year

However, while 'Point-in-time' semantics of fuzzy terms are (strictly speaking) in the range of 0 the 49, the entire set of fuzzy terms are allowed in an "start" time expression. The same holds true in a "duration" time expression, where the entire domain of the fuzzy terms are allowed in. Together The following example uses z57 ("during summer") as part of the Starting Time Syntax, as well as in the alternate form using an Ending Date.

Example: [(d1z57){d2}] is equivalent to the previous example.

Example: [(d1z57)(d3z57)] is also equivalent to the previous example.

Multiple fuzzy terms as part of starting date

Starting time is any year, during Winter, at the start of any Peak Hour period(s)

(z15z55)

Duration is Peak Hour period.

{z65}

So that the complete expression is:

[(z15z55){z65}]

Note that even if Peak Hour has more then one time components, this expression would apply to both times, for the duration of both parts, as appropriate. Suppose rush hour was from 7am to 10am and then again from 4pm to 8pm, then the expression allows the "dual" (or periodic or cyclical) times of 7am for 3 hours, and then 4pm for 4 hours.

Fuzzy start/end symbol vs fuzzy duration symbol in starting date

There is a semantic difference between starting date usage of fuzzy start/end symbols (znn with value range 0..49) and starting date usage of fuzzy duration symbols (znn with value range 50..99 corresponding to fuzzy start/end symbols).

Example: [(y1991h12z57){h2}] means two hour period from noon till 2pm any day during summer 1991

Example: [(y1991h12z7){h2}] means two hour period starting at noon till 2pm after the beginning of summer 1991 (ie. on the first day of summer only)

Sharp time term serving as durative context in starting date/ending date

What is true for fuzzy duration time units actually also is the case for sharp time units. Due to the fact that many sharp time symbols use identical start and duration expressions, the duration context (when combined with fuzzy symbols) is less obvious than for any fuzzy time context.

Example: (M12z15) means the beginning of peak hours during December in any year

Resolution of a Time Equation

Introduction

The problem is to know whether a particular moment (second) belongs to a given Time Domain or not. When the moment in question is within that Time Domain, the boolean value True is attached to the Time Domain.

If not, the boolean value evaluates to False.

Boolean tables

"*" is the boolean AND operator, "+" is the OR operator, and "-" is the "A AND NOT B" operator.

The boolean tables for Time Domain combinations are:

A + B B True False
A
True T T
False T F
A * B B True False
A
True T F
False F F
A - B B True False
A
True F T
False F F

Example of a resolution

Assume we want to know if the previous shop is open on 14 November 1991 at 10: 20 am. We have to check if this particular moment fits with the Time Domain where the Attribute Opening Period refers to.

14 November 1991, 10: 20 am matches the following basic domains:

y1991 / M11 / w46 / d14 / t5 / f25 / l25 / h10 / m20 / s0

A check of the defined Time Domain results in:

"From 9: 00 am to 12: 00am": [(h9){h3}] is True

"From 13: 30 to 19: 00": [(h13m30){h5m30}] is False; "From Monday to Saturday":

[(t2){d6}] is True

Therefore the expression [[[(h9){h3}] + [(h13m30){h5m30}]] *[(t2){d6}]] is True

"1st of May every year": [(M5d1){d1}] is False

"Last Tuesday of January": [(M1l13){d1}] is False;

"All days during August: [(M8){M1}] is False

Thus the complete expression

[[[
[[[(h9){h3}] + [(h13m30){h5m30}]] * [(t2){d6}]]
-[(M5d1){d1}]]
-[(M1l13){d1}]]
-[(M8){M1}]
]

Evaluates to True: The shop is open.