I am looking for a solution that will allow users to sort by date (according to the "Coverage" element). All of the dates are in the standard form: YYYY-MM-DDT00:00 in the "Coverage" element, but it seems that when I add this line of code:
$sortLinks[__('Date')] = 'Dublin Core,Coverage';
in the browse.php file (in current theme) it only does the job half-way.
It attempts to order them by the date entered in the "Coverage" element, but it seems that the "Date Added" which is generated when you create an entry in Omeka is interfering, because I will see a batch of entries sorted chronologically, but then another batch will seem out of place because they were entered on a different day. Any ideas?
Are you sure there's not just something "off" about the dates in those out-of-place records, like leading whitespace or missing zero padding on the year, month, day, or time values?
I'll go through and take another look. It seems odd, right? The only thing with some records is the Coverage element contains dates and coordinates separated by a semi-colon, for example:
Would that throw it off? If so, can they be in two different "input" streams under the "Coverage" element instead?
I decided to go through and move all the dates to the "Date" element and that did the trick. Now I can sort chronologically after inserting this line of code into the browse.php file within my theme:
$sortLinks[__('Date')] = 'Dublin Core,Date';