Calendar Time vs. Elapsed Time
A calendar period describes movement between dates. An elapsed duration describes how much time passed. These sound similar, but they answer different questions.
“One month” does not always mean 30 days
Months have different lengths. One month after 1 March is 1 April, but that span has 31 days. One month after 1 April is 1 May, and that span has 30 days. A calendar month is a position on the calendar, not a fixed number of seconds or days.
Month-end dates make the issue clearer. What should “one month after 31 January” mean when February has no 31st day? Calendar libraries and businesses may clamp the result to the last day of February, move into March, or reject the operation. None of these behaviours is universally correct for every product. The required rule should be explicit.
Days and hours can also differ
A calendar day usually means one date-to-date step on a calendar. An elapsed day means a fixed 24-hour duration. In a region that changes its clocks, a local calendar day can contain fewer or more than 24 elapsed hours. This is why adding 24 hours to an instant is not always the same as asking for the same local time tomorrow.
For example, a reminder scheduled for 9:00 every morning should normally follow the local calendar and stay at 9:00. A timer that should ring exactly 24 hours after it starts should follow elapsed time, even if the displayed local clock changes overnight.
Choose the operation that matches the question
- “How many seconds passed?” Compare exact instants and calculate elapsed duration.
- “What date is one month after this date?” Apply a calendar rule and define month-end behaviour.
- “What time is the weekly meeting next week?” Preserve the intended local clock time and named time zone.
- “How many days does the booking include?” Decide whether the count is inclusive of both endpoints.
Different date-difference tools may report a calendar breakdown, a total number of days, or both. A result such as “1 month and 3 days” can vary depending on which dates and counting convention are used, while the elapsed number of seconds between two exact instants is unambiguous.
Useful software practices
Represent a fixed event as an instant, and use time-zone rules when displaying it locally. Represent birthdays, all-day holidays and due dates as calendar dates when they are not tied to a specific hour. For recurring schedules, store the local time, recurrence rule and named zone. Avoid converting every concept into a timestamp too early, because doing so can erase the distinction between a date and a moment.
Use the site's date difference calculator to compare calendar dates, or the date add and subtract calculator to move forward or backward by calendar days, weeks, months or years. For zone-aware schedules, see What Is a Time Zone?