Tools

Home
StopwatchCountdown TimerDate DifferenceTimerTimezone Converter

Sort Date Intervals

Sort date ranges by start date, end date, or duration in any order

Your files never leave your browser
0
Intervals Sorted
--
Shortest
--
Longest
Ready·Enter date intervals to sort

Paste your date ranges — project timelines, bookings, contract periods — and sort them by start date, end date, or duration in one click. Mixed formats like ISO, US, and written-out dates all work without any cleanup on your end. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste Intervals
→
Parse & Compare
→
Sorted Output

Each line gets split into a start date and an end date. The parser recognizes ISO (2024-01-15), US (01/15/2024), and written-out formats (Jan 15, 2024). Once parsed, the intervals get compared using your chosen sort key — start date, end date, or the number of days between them. Results appear instantly with duration info included.

Examples

Sorting project sprints by start date

Your team ran five sprints last quarter and you need them in chronological order for a retrospective.

INPUT
2024-03-18 - 2024-03-29 2024-01-08 - 2024-01-19 2024-04-01 - 2024-04-12 2024-02-05 - 2024-02-16 2024-01-22 - 2024-02-02
OUTPUT
2024-01-08 - 2024-01-19 (12d) 2024-01-22 - 2024-02-02 (12d) 2024-02-05 - 2024-02-16 (12d) 2024-03-18 - 2024-03-29 (12d) 2024-04-01 - 2024-04-12 (12d)

Finding the longest hotel booking

Sort by duration (descending) to see which reservation spans the most nights.

INPUT
Jun 1, 2024 to Jun 4, 2024 Mar 10, 2024 to Mar 25, 2024 Aug 5, 2024 to Aug 8, 2024
OUTPUT
Mar 10, 2024 - Mar 25, 2024 (16d) Jun 1, 2024 - Jun 4, 2024 (4d) Aug 5, 2024 - Aug 8, 2024 (4d)

Mixed date formats in a contract list

Different departments submitted contract periods in different formats. No need to fix them first.

INPUT
01/15/2024 - 06/30/2024 2024-09-01 - 2024-12-31 February 1, 2024 to April 30, 2024
OUTPUT
01/15/2024 - 06/30/2024 (167d) Feb 1, 2024 - Apr 30, 2024 (90d) 2024-09-01 - 2024-12-31 (122d)

Who Uses This

📋 Project Managers

Ordering milestones and sprint windows for timeline reviews and stakeholder presentations.

🏨 Travel Coordinators

Sorting hotel stays and flight bookings to spot gaps or overlaps in group itineraries.

👨‍💻 Developers

Debugging date-range logic by quickly verifying expected sort order against actual output.

📊 Data Analysts

Pre-sorting reporting periods or fiscal quarters before importing into dashboards.

Common Mistakes

Putting the end date before the start date

Writing "2024-12-31 - 2024-01-01" means the interval is backwards. The tool flags these as invalid and skips them. Flip the dates so the earlier one comes first.

Missing the separator between dates

Pasting "2024-01-15 2024-02-20" without a dash or "to" between them won't parse correctly. Add a " - " or " to " between start and end dates on each line.

Using ambiguous day/month order

Is 03/04/2024 March 4th or April 3rd? The parser reads it as MM/DD/YYYY (US format). If you mean day-first, switch to ISO format (2024-04-03) or spell out the month name to avoid confusion.

Technical Details

Frequently Asked Questions

What date formats can I use for intervals?

You can use ISO dates like 2024-01-15, US-style dates like 01/15/2024, or written dates like Jan 15, 2024. Mix and match across lines — the parser handles each one independently. Separate start and end with a dash or the word "to".

How does sorting by duration work?

Duration sorting counts the days between start and end (both dates included). A range from January 1 to January 3 counts as 3 days. Ascending puts the shortest intervals first; descending puts the longest on top.

Can I sort date ranges that overlap each other?

Absolutely. Overlapping intervals are sorted the same way as non-overlapping ones. Each range is treated independently based on whichever sort key you picked. The tool doesn't merge or flag overlaps — it just orders them.

Is there a limit on how many intervals I can sort?

No hard limit. It runs in your browser, so performance depends on your machine. Sorting a few hundred intervals is instant. Thousands might take a beat, but it'll still work fine.

Does this tool send my dates to a server?

No. All sorting happens right in your browser with JavaScript. Nothing gets uploaded, logged, or transmitted. You could disconnect from the internet after loading the page and it would still work.

Share: