Most people know that February sometimes has 29 days and that clocks change twice a year. What fewer people understand is why these adjustments exist, how they interact with each other, and why they regularly cause real calculation errors - missed deadlines, wrong ages, and meetings booked at the wrong time. Calendar systems are built on top of an astronomical reality that does not divide neatly into whole numbers, and every leap year, daylight saving switch, and time zone boundary is a human attempt to paper over that mismatch. Understanding the rules behind each adjustment helps you avoid the errors before they happen.

Why We Have Leap Years

The Earth takes approximately 365.2422 days to complete one orbit around the sun. A calendar with exactly 365 days per year would drift by about 6 hours annually. After four years, that drift adds up to roughly one full day. Without a correction, the calendar would gradually fall behind the seasons - February would eventually land in summer in the Northern Hemisphere, and the dates associated with the solstices and equinoxes would wander further from their astronomical positions every year.
The Gregorian calendar corrects for this by inserting February 29 every four years. But 365.25 is slightly more than 365.2422, so that correction overcorrects by about 11 minutes per year. Left unchecked, those 11 minutes would accumulate into a full day over about 128 years. To compensate, the Gregorian system skips leap years in century years - years divisible by 100 - unless they are also divisible by 400.
The rule in plain terms: a year is a leap year if it is divisible by 4, except when it is divisible by 100, except when it is also divisible by 400. So 2000 was a leap year (divisible by 400), 1900 was not (divisible by 100 but not 400), and 2100 will not be. This three-level rule keeps the calendar accurate to within one day over roughly 3,300 years.
People Born on February 29
A February 29 birthday is a genuine edge case for date math. Most software treats the birthday as March 1 in non-leap years, but not all software agrees - some systems use February 28 instead. If you are calculating someone's exact age or running a date comparison across a February 29, verify which rule the system follows. The difference is one day, but in legal, financial, or medical contexts, that day can matter.
How Daylight Saving Time Works

Daylight Saving Time (DST) is the practice of shifting clocks forward by one hour in spring and back by one hour in autumn so that daylight hours align more closely with typical waking hours. The standard mnemonic is "spring forward, fall back."
In the United States, clocks move forward at 2:00 AM on the second Sunday of March and back at 2:00 AM on the first Sunday of November. The European Union uses the last Sunday of March and the last Sunday of October. Many countries - including Japan, China, India, and most of Africa - do not observe DST at all, which means the hour difference between those countries and DST-observing countries changes twice a year.
The spring transition creates a gap in time that literally does not exist. If a scheduled task, alarm, or log entry is set for 2:30 AM on the night clocks spring forward, that moment never occurs. The clock jumps from 1:59 AM directly to 3:00 AM. Software handles this differently depending on how the developer implemented it - some skip the task, some fire early, and some fire at 3:00 AM instead.
The autumn transition creates the opposite problem: a repeated hour. The period from 1:00 AM to 1:59 AM happens twice on the night clocks fall back. Any scheduled job, alarm, or timestamp recorded during that hour is ambiguous without knowing which occurrence is meant. For logs, financial records, and legal filings, UTC timestamps eliminate this ambiguity entirely because UTC never observes DST.
Why DST Dates Shift Every Year
DST boundaries are defined by day of the week and week number, not by fixed calendar dates. The second Sunday of March falls on a different date each year. This matters for payroll, scheduling, and any calculation that counts the exact number of hours in a given day. Days with a DST transition have either 23 hours (spring) or 25 hours (autumn), not 24.
Calendar Quirks That Break Date Math

Beyond leap years and DST, calendars carry several less-obvious properties that cause errors in everyday date calculations.
Months Are Not Equal in Length
Months range from 28 to 31 days. Adding one month to a date is not the same as adding 30 or 31 days, and the phrase "one month from today" is genuinely ambiguous when today falls near the end of a long month. Adding one month to January 31 produces no February 31 - different systems resolve this as either February 28 (or 29) or March 2 (or 3). Adding one month to March 31 lands on April 30, not May 1. If a deadline is described as "one month out," always verify the specific calendar date rather than approximating with 30 days.
Weeks Do Not Divide Evenly Into Years
A year contains 52 weeks plus one or two extra days. A given date therefore falls on a different day of the week each year. If a recurring event is scheduled for the third Tuesday of the month, that is not the same as 21 days from the first of the month in every case. Counting week-relative dates requires checking the actual calendar rather than applying arithmetic to a fixed offset.
Your Age Is Not Just Year Subtraction
Subtracting a birth year from the current year gives a number that is off by one for part of every year. A person born December 15, 1990 is 35 years old on June 17, 2026 - not 36, even though 2026 minus 1990 equals 36. The birthday has not yet passed in 2026, so the person has not completed their 36th year. Systems that skip this check report ages that are one year too high for the portion of each year before the birthday.
Need to calculate an exact age including the correct handling of birthdays not yet reached this year? The age calculator handles leap year birthdays and partial years automatically.
Try the Age CalculatorTime Zones and the Lines That Divide Them

Time zones were standardized in the late 19th century primarily to solve the problem of railroad scheduling. Before standardization, each city kept its own local solar time. A train schedule that listed departure and arrival times in local time was effectively unreadable for passengers traveling any significant distance.
Today there are approximately 38 distinct UTC offsets in use worldwide. That number is higher than most people expect because some zones are offset by 30 or even 45 minutes from the nearest whole hour. India uses UTC+5:30, Nepal uses UTC+5:45, and parts of Australia use UTC+9:30 or UTC+10:30. Assuming that all time zones are whole-hour offsets from UTC causes scheduling errors for anyone working with those regions.
The International Date Line
The International Date Line runs roughly along the 180-degree meridian in the Pacific Ocean. Crossing it westward advances the calendar date by one day; crossing it eastward moves it back one day. This is why flights from the US West Coast to Japan or New Zealand appear to arrive before they departed when departure and arrival times are listed in local time - the arrival date is a calendar day ahead of the departure date.
When DST Complicates Time Zone Comparisons
When two countries share the same standard UTC offset but one observes DST and the other does not - or they switch on different dates - the actual hour difference between them changes several times per year. The United Kingdom and Portugal both use UTC+0 as their standard offset but can briefly run at different local times during the narrow window when one has switched to summer time and the other has not yet. The Eastern United States and the parts of Indiana that did not historically observe DST have had similar complications in the past.
Scheduling a meeting across multiple time zones? The time zone converter shows the current hour in 21 cities side by side so you can find an overlap window without doing the math manually.
Open the Time Zone ConverterPutting It Together: Accurate Date Calculations
Most date errors come from one of four causes: forgetting about leap years, ignoring DST transitions, treating all months as 30 days, or misreading time zone offsets. Here is how to handle each one correctly.
Counting Days Between Two Dates
The naive approach of subtracting two dates works in most cases but fails when the range crosses a February 29 or a DST boundary. A common trap is the phrase "in 6 months." Six months from August 31 lands on February 28 or 29, not March 2. Six months from March 31 lands on September 30, not October 1. Always verify the specific target date on a calendar rather than approximating with a fixed number of days.
For longer ranges, compound errors accumulate. A range spanning two years may cross multiple DST transitions and potentially a February 29. The difference between a naive calculation and a correct one can easily reach one or two days.
Need the exact number of days between two dates, including across leap years and month-length differences? The date difference calculator handles all of these edge cases automatically.
Try the Date Difference CalculatorCountdowns to Future Events
Countdown calculations share the same leap year and DST traps. A countdown to a December 31 deadline set up in early February will pass through at least one DST transition and possibly a February 29. A day count fixed at the beginning of a long countdown will drift from the true remaining days as those transitions occur.
The most reliable approach is to recalculate the days remaining against today's date each time you check, rather than decrementing a counter set at the start. The days until calculator does exactly this - it recalculates the remaining days from today each time it loads, so the count is always current regardless of when you first set the target date.
Working Hours vs Calendar Days
A deadline described in business days is not a deadline described in calendar days. Five business days from a Monday is the following Monday, not Saturday. Legal, financial, and contractual deadlines specified in business days also typically exclude public holidays, which vary by jurisdiction. Always count the specific calendar dates rather than multiplying by a fixed daily offset.
Storing Timestamps Reliably
Software timestamps are typically stored in UTC and converted to local time for display. This is the correct approach precisely because UTC never observes DST and has no ambiguous hours. If you are building a system that records times - a log, a scheduling tool, a payment processor - store UTC and convert to local time only at the display layer. For any time-sensitive record you receive from a third party, the UTC timestamp is more reliable than the displayed local time during DST transition weeks.
The Bottom Line
Leap years, daylight saving time, unequal month lengths, and time zone offsets are each small adjustments individually. The problems appear when they stack - when you are calculating an age that spans a February 29, or counting days across a DST transition, or scheduling a meeting between a country that uses UTC+5:30 and one that switched to summer time last week. Understanding the rule behind each adjustment is the first step to catching errors before they propagate into real mistakes. For the calculations themselves, date tools that account for these edge cases automatically save you from having to remember every rule every time.
← Back to all articles
