An integer, string, or time·stamp which identifies and orders a thing within a given context.
String values can either be valid
Because this property is functional, a
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
Otherwise, if base is the canonical representation of some
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
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
For
When the “time on timeline” value is the same,
When the “time on timeline” value is the same for two
Strings which match
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
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.