🔍

首页Home › 日期时间Date & Time

✂ 截断日历日期Truncate Calendar Date

把每行日期截到所在周(周一或周日开始)、月、季度或年的第一天。本地处理。可设置「截断到」。Truncate each date (one per line) to the start of its week (Monday or Sunday), month, quarter or year. Processed locally. Settings: Truncate to.

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

「截断日历日期」是什么?What is the Truncate Calendar Date tool?

把每行日期截到所在周(周一或周日开始)、月、季度或年的第一天。本地处理。可设置「截断到」。Truncate each date (one per line) to the start of its week (Monday or Sunday), month, quarter or year. Processed locally. Settings: Truncate to.

如何使用「截断日历日期」?How do I use the Truncate Calendar Date tool?

每行输入一个日期,在“截断到”里选择月、周(周一或周日开始)、季度或年,下方即显示各自的第一天。Enter one date per line and choose month, week (Monday or Sunday start), quarter or year under Truncate to; the first day of each period appears below.

周从哪天开始?When does a week start?

可选周一开始(ISO 习惯)或周日开始(美国习惯)。星期按儒略日编号计算,0001–0099 年也正确;0001-01-01 是星期一,所以周日开始时 0001-01-01 至 0001-01-06 所在周会超出范围并报错。Choose a Monday start (ISO style) or a Sunday start (US style). Weekdays come from the Julian Day Number, so years 0001 to 0099 are also right; 0001-01-01 is a Monday, so with a Sunday start the week of 0001-01-01 to 0001-01-06 begins before the supported range and is reported as an error.

可以一次处理多个日期吗?Can I truncate several dates at once?

可以,每行一个日期,空行跳过;格式不对的行会报出行号,并且不输出任何结果,请修正后再试。Yes, one date per line; blank lines are skipped. An invalid line is reported with its line number and nothing is output until it is fixed.

和四舍五入有何不同?How is it different from rounding?

截断总是退回到所在区间的第一天,不会进位。Truncating always goes back to the first day of the period and never rounds up.

用的是哪种历法、支持哪些年份?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?

例如把「截断到」设为 月初,输入 2024-03-15,输出为:2024-03-01。With "Truncate to" set to Month, the input 2024-03-15 becomes 2024-03-01.

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

「截断日历日期」的设置:「截断到」可选 月初、周(周一开始)、周(周日开始)、季度初、年初(默认 月初)。每次生成结果都按当前设置处理。Settings in the Truncate Calendar Date tool — "Truncate to": Month, Week (Monday start), Week (Sunday start), Quarter, Year (default Month). The result always uses the current settings.

「截断日历日期」免费吗?需要注册吗?Is the Truncate Calendar Date tool free? Do I need an account?

「截断日历日期」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Truncate Calendar Date 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

✂ 截断时钟时间Truncate Clock Time📅 四舍五入日历日期Round Calendar Date✅ 校验日历日期Validate Calendar Date✅ 校验时钟时间Validate Clock Time📊 可视化日期区间Visualize Date Intervals📊 可视化时间区间Visualize Time Intervals⏱ 日期时间差Date/Time Difference📅 日期时间计算器Date/Time Calculator支票 支票日期大写Check Date in Chinese Words📅 今天的日期(实时时钟、第几天、ISO 周)Today's Date (live clock, day of year, ISO week)📦 交货周期与再订货点Lead Time & Reorder Point Calculator🎂 出生年份计算器(按年龄和是否已过生日)Birth Year Calculator (from Age and Birthday)

← 全部工具All tools