Forgotten Realms Wiki:Sorting the years

Ideally, the years should be in numerical order, but the categories are sorted in alphabetical order by default. For example, take the years 14 DR, 135 DR and 1270 DR. If these are placed in the same category with no sort key, they will be ordered as follows:
 * 1270 DR
 * 135 DR
 * 14 DR

This is due to the alphabetical sorting. It is possible to get around this to sort positive years, by assigning sort keys with leading zeros, like this:

This will ensure that all the years are placed in correct numerical order, but has the side effect that they are all categorized under "0".

The problem arises when dealing with negative numbers. Using the same process...

...the years are placed in the correct numerical order in the "-" category, but this is the reverse of the correct chronological order (-14 DR appears before -1270 DR)..

Sorting solution
This system is based around the premise that the history will begin at -35000 DR (the Days of Thunder). For this system all you have to do is add or subtract the year from 35000; subtraction for years before 1 DR and addition for years after. For example:


 * -1081 DR: (35000 - 1081) –
 * -1076 DR: (35000 - 1076) –
 * -408 DR: (35000 - 408) –
 * 1 DR: (35000 + 1) –
 * 145 DR: (35000 + 145) –