GDF Time Domains

Characteristic

Short description

GDF time domains are a possibility to specify time intervals. Their advantage is that multiple recurring intervals can be defined by only one string. For a complete definition of the GDF time domain format please have a look at the ISO format specification. Hereafter, only the features supported by the PTV xServer will be described.

Use

GDF time domains are one option to specify a time interval. In the xTour service they can be used to model opening intervals, for example if a customer has the same office hours for multiple weekdays. Note that when using the GDF time domains in xTour, a planning horizon is required to limit the total number of intervals defined by the recurring intervals of the time domains. The planning horizon is also used to define the timezone of the GDF time domains.

In the xMap and xRoute services the GDF time domains are used to describe the validity period of time dependent features, see Feature Layer Basics.

Detailed Consideration

Fully Supported syntax

Generally, a time domain is composed of a starting date and/or a time duration with the following notation: [(Starting Date){Time duration}].

'[' and ']' are mandatory and exactly one of each shall be used to encase a basic time domain.

The following terms can be used to describe the desired time domain. Each of those terms is valid in the starting date block. Terms marked in the column "Can be used as duration" are also valid as time duration. In the case of acting as a time duration, all terms have possible values in the range 0...99.

Time term Format Values Can be used as duration
Year ynnnn 1000...9999 x
Month Mnn 1...12 x
Week wnn 1...53 x
Day (in a month) dnn 1...28/29/30/31 x
Day of the week tn 1...8
Weekday in a month fxn x: 1...5, n: 1...7
Weekday in a month lxn x: 1...5, n: 1...7
Hour hnn 0...23 x
Minute mnn 0...59 x
Second snn 0...59 x

Notice that the time terms, for the starting date and for the duration, must be added following the logical sequence.

Starting date combination:

Starting date time terms combination

Duration combination:

Duration time terms combination

Notice that the days of the week are ordered from Sunday to Saturday. The value 8 stands for public holiday. Furthermore the days of the week are the only term that can be used recursive in the starting date block as can be seen in the examples below. Also there are two possible terms for the definition of certain weekdays of a month. Both define the parameter n in the format as the weekdays (in the same order as mentioned for the days). The parameter x is interpreted differently, i.e. in the format fxn it is the first/second/... occurence of the day in the month whereas in the format lxn it is the last/last but one/... occurence of the day in the month.

Examples:

Combining time domains

It is also possible to combine multiple GDF time domains. There are three basic possibilities to do that:

Examples:

Restrictions

Since the time zone of a GDF time domain in the xTour service is set to the time zone of the planning horizon, a time domain will not consider a clockchange between summertime and wintertime or the other way round.

Syntax that can occur in Feature Layers

The following syntax also defines valid GDF time domains and can occur in Feature Layers, but it is not (fully) supported as input for the xServer interval type GDF time domains.

Alternatively to the above syntax a basic time domain may be composed of a starting date and an ending date with the following notation: [(Starting Date) (Ending Date)].

Please note that the ending date is excluded and that the maximum authorized duration between the starting date and the ending date must not exceed 68 years.

Example:

Special cases of a time domain are:

It is specific for each time domain related attribute 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 fields 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 a special role within the time syntax. It may precede the duration component, which changes the duration semantics into a negative duration: that is a 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 above) becomes "negative always", which then would read "always until the start time". There are other uses of minus signs within either term which are explained in their respective sections, and there are minus signs used in compound time expressions and those are explained in that section.

Example:

Technical ConceptFeature Layer Basics