This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

Sorting Dates using $Sort

When using the 'Sort' Group of user attributes ($Sort, $SortAlso) to sort on any Date-type attribute, any default not-yet-set "never" dates are listed last. This the same for both note and agent based container sorting.

If the sort is reversed (suing ($SortBackward and $SortBackwardAlso), the "never" dates list first.

This indicates Tinderbox is using a lexical sort—sorting the dates as if literal text strings as opposed to using their implied date numbering. The linked page explains the logic of lexical sort.

A separate article covers sorting Date-type data using Action code.

Legacy note: In older versions of Tinderbox, the "never" dates always listed first regardless of the sort/reverse order. That reflected user requests to make non-set dates easier to find. It appears this older behaviour no longer occurs. However, if encountered, that it the reason for the difference form the above.