📅 生成日期序列Generate Date Sequence
生成从起始到结束(含两端)的日期列表,可按天、周、月或年步进,结束早于开始时倒序生成。输入两行:起、止。本地处理。Dates from start to end (inclusive), stepping by days, weeks, months or years; an end before the start gives a descending list. Input two lines: start, end. Processed locally.
使用说明与常见问题How-to & FAQ
「生成日期序列」是什么?What is the Generate Date Sequence tool?
生成从起始到结束(含两端)的日期列表,可按天、周、月或年步进,结束早于开始时倒序生成。输入两行:起、止。本地处理。Dates from start to end (inclusive), stepping by days, weeks, months or years; an end before the start gives a descending list. Input two lines: start, end. Processed locally.
如何使用「生成日期序列」?How do I use the Generate Date Sequence tool?
在两行里分别输入开始和结束日期,可设置间隔和单位,下方即生成两者之间(含两端)的日期列表。Enter the start date and the end date on two lines and optionally set Step and Unit; every date between them, both ends included, appears below.
结束日期早于开始日期会怎样?What if the end is before the start?
会倒序生成,例如 2020-01-03 到 2020-01-01 得到 01-03、01-02、01-01。The list is generated in descending order; 2020-01-03 to 2020-01-01 gives 01-03, 01-02 and 01-01.
可以按月或按年步进吗?Can I step by months or years?
可以,在“单位”里选择天、周、月或年;“间隔”留空按 1 计算。按月/年时较短的月份取当月最后一天,例如 2024-01-31 起每月得到 2024-02-29。Yes, choose days, weeks, months or years under Unit; an empty Step counts as 1. With months or years, a short month uses its last day, so monthly steps from 2024-01-31 give 2024-02-29.
最多能生成多少个?How many dates can it generate?
最多 501 个(含两端),超过时会提示增大间隔或缩短范围。只需输入起、止两行,多余的行会报出行号。Up to 501 including both ends; beyond that the tool asks for a larger step or a shorter range. Enter just the two lines; any extra line is reported with its line number.
用的是哪种历法、支持哪些年份?Which calendar and years are supported?
按外推格里高利历(现行公历规则向前沿用)计算,年份为 0001–9999 的整数,输出年份一律 4 位补零(如 0005-12-25)。1e3、0x10 这类写法和多余的内容会报错。The proleptic Gregorian calendar (today's rules applied backwards) for whole-number years 0001 to 9999, always shown with 4 digits such as 0005-12-25. Forms like 1e3 or 0x10 and extra text give an error.
这个工具和时区有关吗?Do time zones affect this tool?
无关。结果只由输入的年份或日期按历法规则算出,不读取设备时钟,也不使用任何时区。No. The result is worked out from the year or date you enter with calendar rules alone; it never reads your device clock or uses a time zone.
输入和输出是什么样的?What does the input and output look like?
例如输入 2020-01-01 ⏎ 2020-01-03,输出为:2020-01-01 ⏎ 2020-01-02 ⏎ 2020-01-03(⏎ 表示换行)。The input 2020-01-01 ⏎ 2020-01-03 becomes 2020-01-01 ⏎ 2020-01-02 ⏎ 2020-01-03 (⏎ marks a line break).
有哪些选项可以调整?What options can I adjust?
「生成日期序列」的设置:「间隔」默认 1;「单位」可选 天、周、月、年(默认 天)。每次生成结果都按当前设置处理。Settings in the Generate Date Sequence tool — "Step" default 1; "Unit": Days, Weeks, Months, Years (default Days). The result always uses the current settings.
「生成日期序列」免费吗?需要注册吗?Is the Generate Date Sequence tool free? Do I need an account?
「生成日期序列」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Generate Date Sequence 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.