Date & Time

How Adding or Subtracting Days From a Date Is Calculated

Adding or subtracting days from a date is calendar-aware day-by-day arithmetic — correctly rolling over month and year boundaries, including February's leap-year length, rather than a simple fixed-length addition.

A worked example: 30 days after September 12, 2026

Adding 30 days to September 12, 2026 lands on October 12, 2026 — a Monday. The calculation correctly rolls past the end of September (which has 30 days) into October.

Going the other direction: 45 days before

Subtracting 45 days from that same September 12, 2026 lands on July 29, 2026 — a Wednesday — rolling backward through August and partway through July.

Why this needs real calendar logic, not fixed-length months

Simply adding "30 days = 1 month" would be wrong — months range from 28 to 31 days, so correct date arithmetic has to actually track day-by-day through real calendar month boundaries, correctly handling February's 28 or 29 days depending on whether the year is a leap year.

What the day-of-week result actually gives you

Beyond just the resulting calendar date, knowing which day of the week it falls on is often the more immediately useful piece of information — for scheduling a delivery, checking whether a deadline lands on a weekend, or planning an event.