Historians, fact-checkers and project managers documenting milestones all gather events from scattered sources, and they rarely arrive in order. Sorting them by hand in a table and then working out the time between each pair is tedious and error-prone, especially when bare years sit alongside full dates.
The tool reads each line as a date followed by a description and accepts dates in ISO 8601 form: a year on its own, year and month, or year, month and day, with negative numbers for years before the Common Era. It sorts the events in ascending order, works out the gap from each event to the previous one in solar years of 365.25 days, and reports the total span from the first event to the last.
The default example deliberately lists four events out of order: the unification of Saudi Arabia on 23 September 1932, the Hijra in 622, the founding of the Arab League on 22 March 1945, and the founding of the Gulf Cooperation Council on 25 May 1981. Sorted, the Hijra comes first, unification follows 1310.7 years later, the Arab League 12.5 years after that, and the GCC 36.2 years later. The total span is 1359.4 years, from 622 to 25 May 1981.
A bare year is treated as 1 January of that year, so the gap between it and a full date is approximate and can be off by up to a year. The last column shows the rhythm of the story: a run of short gaps marks a dense period, while a long gap is worth asking what happened in between.
The main thing to watch is that the tool works in the Gregorian calendar. Convert Hijri dates first with the library's date converter, or they will be sorted wrongly. Lines whose date cannot be read are skipped with a warning, so do not write dates as day, month, year. A timeline is only as reliable as its sources: the tool sorts and measures, but it cannot check that an event really happened on the date given.