计算两个日期之间的天数、周数、月数或年数,也可以从任意日期加减天数。
The simplest way to find days between dates is to convert both dates to a day count from a fixed reference point, then subtract. Our calculator does this automatically for any pair of dates.
Common uses for date calculations: counting days until a deadline or event, calculating someone's age in days, determining contract durations, figuring out when a payment is due, and calculating how many shopping days until a holiday.
Adding months is trickier than adding days because months have different lengths. Adding 1 month to January 31 is ambiguous — some systems use February 28, others use the last day of the target month. Our calculator uses the standard approach of adjusting to the last valid day of the month.
日期运算是计算两个日历日期相隔的天数,需要考虑每月天数和闰年(每 4 年一次,但不能被 400 整除的整百年除外)。计算器通常把每个日期转换为序列日数再相减。
从 2026 年 1 月 1 日到 2026 年 7 月 4 日共 184 天:1 月剩余 30 天 + 28 天(2026 年 2 月不是闰年)+ 31 + 30 + 31 + 30 + 4。
计入首尾还是不计? 惯例是不含起始日、含结束日;合同期限的定义可能不同,请以条款为准。
只算工作日? 工作日统计不含周六和周日,通常也不含法定假日,而各国的假日并不相同。
为什么每个月的天数不一样? 这是罗马历法留下的遗产 — 也正因如此,重要的事情用自动化的天数计算比心算更可靠。