This is a date sort function from slightly modified
name.sort.php. It needs to be placed in the
framework/libraries/openterracotta/sort/ directory and
the $configuration['function']['sort'] = "name"; line
must be changed to $configuration['function']['sort']
= "date"; in framework/configuration/configuration.php.
Date Sort (date.sort.php)