An integer, string, or time·stamp which identifies and orders a thing within a given context.

String values can either be valid ¦s or else have the form of a or with no time·zone component. These possibilities were selected to ensure that the lexical forms of each type are disjoint.

Because this property is functional, a must be used when local notation depends on a particular context.

Correctly ordering things by local notation involves two steps. First, the local notation must be split into a tuple of two parts :⁠—

If it is a string which begins with an underscore and contains another underscore which is followed by a period :⁠—

Let base be the portion of the string which follows the initial underscore and precedes the first successive underscore‐period sequence.

Let mod be the portion of the string which follows that same underscore‐period sequence.

If mod is not itself a valid canonical representation for some local notation, then the first value of the tuple is the original string, and the second value is the empty string.

Otherwise, if base is a valid or else has the form of a or with no time·zone component, then the tuple is {base, mod}.

Otherwise, if base is the canonical representation of some int, then the tuple is {int, mod}.

Otherwise, make the following modifications to base :⁠—

Replace all underscores in base with plusses.

If base contains T, replace the first two periods in base which follow T (if present) with colons.

If base ends in a digit, replace the final remaining period in base (if present) with a colon.

If, after making the above substitutions, base is the canonical representation of some time, then the tuple is {time, mod}.

Otherwise, the first value of the tuple is the original string, and the second value is the empty string.

Otherwise, the first value of the tuple is the original string, and the second value is the empty string.

Then, the values of the tuples can be sorted according to the following rules, with the first part taking priority over the second :⁠—

Empty strings are always sorted first.

Integers are sorted by numeric value and come after empty strings.

Time·stamps and strings which match or come after integers, and are sorted according to their corresponding “time on timeline” values, with the following modifications :⁠—

For values, the missing day component is treated as the first rather than the last day of the month

When the “time on timeline” value is the same, sorts before , and sorts before .

When the “time on timeline” value is the same for two values, they are sorted based on their timezone offsets in ascending order.

Strings which match follow the above, and are sorted lexically by code·point value.

The above algorithm effectively establishes a special microsyntax in which _base_.mod will always sort after base, regardless of base¦s type. When base is a , a few reversible modifications need to be made in order to satisfy the syntax :⁠—

Any colons in the time component or time·zone offset must be replaced with periods.

A plus in the time·zone offset, if present, must be replaced with an underscore.

[0-9]{4}(-[0-9]{2}){1,2}