Understanding the DATETIME_FORMATS.XML document

The DATETIME_FORMATS.XML document is a TEXTML Server system document that provides the date and time formats and patterns that are used for date index definitions.

Tip: To retrieve the DATETIME_FORMATS document, see Retrieve all system documents for a docbase.

DATETIME_FORMATS lists date and time formats and patterns for each locale. For example:

<format NAME="en_US" LANG="en" DELIM="; - / \ , .'" 
COMB="DateTime" INFO="English/United States" STRICT="No">
Table 1 provides information on the date and time data within this document.
Table 1. Date and time formats data
Format element attribute Description
NAME The name of the format, which is a locale. The INFO attribute provides more information on each locale. Each format proposes a set of patterns.
LANG The language of the format.

The language code follows the ISO-639 standard, (see http://www.w3.org/WAI/ER/IG/ert/ iso639.htm). while the country code follows the ISO-3166 standard (see http://www.iso.org/iso/en/ prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html).

Three additional formats are defined:

  • IXIA_ym_num, for dates, written with numbers, that contain the year and the month only. This format specifies that the year always appears first. For example, 01/02 is read as February 2001.
  • IXIA_my_num, for dates, written with numbers, that contain the year and the month only. This format specifies that the month always appears first. For example, 01/02 is read as January 2002.
  • ISO 8601, for dates written according to the ISO 8601 standard.
DELIM The recognized separators.

For each date or time format, TEXTML Server recognizes a set of separators. It can therefore recognize and properly index virtually any date or time, whatever the separator used.

COMB The order in which TEXTML Server evaluates times and dates when they appear in the same element. TEXTML Server can read date and time combinations, such as Thursday, October 31, 2002, 17:03.

The COMB attribute indicates the order in which the date and time appear so that the indexing engine can recognize them. For example, let’s assume you specify a format that accepts EEEE d MMMM yy and MMMM yy as patterns for dates, and h:mm:ss a and H mm ss as patterns for times.

If the COMB attribute is set to TimeDate, the indexing engine will try to match the date in the XML element with each date pattern in the following order:
  • EEEE d MMMM yy
  • MMM yy
  • h:mm:ss a EEEE d MMMM yy
  • H mm ss EEEE d MMMM yy
  • h:mm:ss a MMM yy
  • H mm ss MMM yy
INFO Describes the locale.
STRICT If Yes, indicates that the evaluated date must match the length of the pattern. (Set to Yes for the ISO format only.)