Last modified: 2013-12-13 19:50:00 UTC
Example: {| class="wikitable sortable" |- ! data-sort-type="number" | Number of foos |- | 2 |- | unknown |- | 5 |- | N/A |- | 1 |- | 0 |- | N/A |- | unknown |} This currently sorts as: unknown N/A 0 N/A unknown 1 2 5 while the expected order is N/A N/A unknown unknown 0 1 2 5 I.e: When the sort type is numerical, the function used for comparison should sort * two numbers according to their value * any number (including 0 and negative numbers) after any non-number * two non-numbers according to their position in alphabet
I'm pretty sure what you described is called "natural sorting" (identifying runs of digits and non-digits and sorting them separately – http://www.codinghorror.com/blog/2007/12/sorting-for-humans-natural-sort-order.html), and something I would love to implement some day. (Somewhat related: bug 45161.)