🔍

首页Home › 日期时间Date & Time

🔢 排序日期区间Sort Date Intervals

每行一个区间“起始 结束”,按开始日期排序,开始相同再按结束日期,仍相同保持原顺序。无效的行带行号列出。本地处理。Sort date intervals (start end per line) by start date, then end date, then input order. Invalid lines are listed with line numbers. Processed locally.

使用说明与常见问题How-to & FAQ

「排序日期区间」是什么?What is the Sort Date Intervals tool?

每行一个区间“起始 结束”,按开始日期排序,开始相同再按结束日期,仍相同保持原顺序。无效的行带行号列出。本地处理。Sort date intervals (start end per line) by start date, then end date, then input order. Invalid lines are listed with line numbers. Processed locally.

如何使用「排序日期区间」?How do I use the Sort Date Intervals tool?

每行输入一个区间“开始日期 结束日期”(YYYY-MM-DD YYYY-MM-DD),下方即按开始日期排好;勾选“降序”可倒过来。Enter one interval per line as start date and end date (YYYY-MM-DD YYYY-MM-DD) and the sorted list appears below; tick Descending to reverse it.

开始日期相同时怎么排?How are ties ordered?

先按开始日期,开始相同再按结束日期,两者都相同时保持输入中的先后顺序(稳定排序)。勾选“降序”时开始和结束都倒序,相同的仍保持输入顺序。By start date, then by end date; when both are equal the original input order is kept (a stable sort). With Descending ticked both start and end are reversed, and equal intervals still keep their input order.

某一行格式不对会怎样?What happens when a line is invalid?

其余有效的行照常处理;无效的行(包括末尾多出内容的行,如“2020-01-01 2020-01-05 junk”)不进入结果,并在结果下方用红字列出行号和原因。所有行都无效时显示“未处理任何内容”和前几条错误。The valid lines are processed as usual. Invalid lines, including lines with extra text such as "2020-01-01 2020-01-05 junk", are left out and listed in red below the result with their line numbers and reasons. If no line is valid you get "nothing was processed" with the first errors.

结束日期可以早于开始日期吗?Can the end date be before the start date?

不可以,这样的行会被列为错误。开始和结束可以是同一天(长度 1 天,两端都计入)。No, such a line is listed as an error. Start and end may be the same day (1 day long, both ends count).

用的是哪种历法、支持哪些年份?Which calendar and years are supported?

按外推格里高利历(现行公历规则向前沿用)计算,年份为 0001–9999,输出一律为 4 位年份的 YYYY-MM-DD。1582-10-05 至 1582-10-14 在 1582 年改历的国家并不存在,这里仍按外推格里高利历处理。The proleptic Gregorian calendar (today's rules applied backwards) for years 0001 to 9999, always written as YYYY-MM-DD with a 4-digit year. 1582-10-05 to 1582-10-14 never happened in countries that switched calendars in 1582; they are still handled on the proleptic Gregorian calendar here.

和时区有关吗?Do time zones matter?

无关,这里只处理钟面时间或日历日期,不读取设备时钟,也不考虑夏令时。No. It works on clock readings or calendar dates only, never reads your device clock and ignores daylight saving time.

输入和输出是什么样的?What does the input and output look like?

例如输入 2020-01-10 2020-01-20 ⏎ 2020-01-01 2020-01-05,输出为:2020-01-01 2020-01-05 ⏎ 2020-01-10 2020-01-20(⏎ 表示换行)。The input 2020-01-10 2020-01-20 ⏎ 2020-01-01 2020-01-05 becomes 2020-01-01 2020-01-05 ⏎ 2020-01-10 2020-01-20 (⏎ marks a line break).

有哪些选项可以调整?What options can I adjust?

「排序日期区间」的设置:可勾选:「降序」。每次生成结果都按当前设置处理。Settings in the Sort Date Intervals tool — tick boxes: "Descending". The result always uses the current settings.

「排序日期区间」免费吗?需要注册吗?Is the Sort Date Intervals tool free? Do I need an account?

「排序日期区间」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Sort Date Intervals tool is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

🔢 排序时间区间Sort Time Intervals🔢 排序日历日期Sort Calendar Dates🔤 拼读日历日期Spell Calendar Date🔤 拼读时钟时间Spell Clock Time✂️ 把日期范围切成区间Split Date into Intervals✂️ 把时间范围切成区间Split Time into Intervals✂ 截断日历日期Truncate Calendar Date✂ 截断时钟时间Truncate Clock Time✅ 校验日历日期Validate Calendar Date✅ 校验时钟时间Validate Clock Time📊 可视化日期区间Visualize Date Intervals📊 可视化时间区间Visualize Time Intervals

← 全部工具All tools