跳到主要内容

日期计算

UpBox优盒工具箱,免费在线日期计算器,计算两个日期相差天数、工作日与周数,支持按天、周、月、年做日期加减,含本月与今年快捷区间。

无需注册 · 数据不上传No sign-up · nothing uploaded

日期区间Date range

相差天数-
周 / 天-
工作日-
含首尾-
已按所选日期计算

按自然日计算,工作日含首尾两天、仅排除周六周日,不含法定节假日与调休;日期加减遇到月末自动取当月最后一天

日期推算Date arithmetic

推算结果 -
本工具所有运算在本地浏览器完成,你的文件、文本不会上传到服务器

工具介绍

算两个日期之间隔了多久,最容易出错的是首尾算不算。这里把相差天数、含首尾天数、完整周加剩余天、工作日四个数分开列出来,需要哪个就取哪个。 Working out how far apart two dates are mostly goes wrong on whether the endpoints count. This lists days apart, inclusive days, full weeks plus remainder, and workdays separately, so you take the number you actually need.

右边的推算按自然日推进,遇到 1 月 31 日加一个月会自动落到 2 月 28 日或 29 日,不会溢出到下个月。工作日只排除周六周日,法定节假日与调休需要自己再核。 The arithmetic on the right advances by calendar days, and 31 January plus one month clamps to 28 or 29 February instead of overflowing. Workdays exclude only Saturdays and Sundays — check public holidays and make-up workdays yourself.

  • 日期差计算Days between
  • 工作日统计Workday count
  • 日期加减Date arithmetic
  • 月末自适应Month-end clamp
  • 快捷区间Preset ranges

使用说明

  1. 选择开始与结束日期。Pick start and end dates.
  2. 读取四项统计结果。Read the four figures.
  3. 在右侧填基准日与偏移。Set a base date and offset on the right.
  4. 选择单位并计算。Pick a unit and calculate.

常见问题

工作日算节假日吗?Do workdays exclude public holidays?
不算,只排除周六周日。国庆、春节这类假期需要你自己再减。No — only Saturdays and Sundays are excluded; subtract holidays such as National Day or Spring Festival yourself.
为什么加一个月会变到月末?Why does adding a month land on the last day?
1 月 31 日加一个月没有 2 月 31 日,按惯例取 2 月最后一天,闰年则是 29 日。There is no 31 February, so by convention it clamps to the last day of February — the 29th in a leap year.
相差天数含首尾吗?Do the days include both endpoints?
「相差天数」不含起始日,「含首尾」会在差值上加 1。“Days apart” excludes the start date; “inclusive” adds one to that figure.
结束日期早于开始日期会怎样?What if the end is before the start?
结果为负数,工作日同样为负,便于判断方向。The result is negative, and workdays are negative too, so the direction stays visible.
广告位

此处为广告位,可放置你的推广素材

支持图片、文字或 HTML 代码,替换本区块内容即可投放

浏览其他分类