How Day31 counts days

Every residency and visa rule is day arithmetic. This page is the canonical reference for how the app — and this site's calculators — do that arithmetic, edge case by edge case.

What counts as a day: the midnight rule

Day31 counts you as present in the place where you were at local midnight. This matches the convention behind most statutory day-count tests: the IRS counts any day you are present in the US at any time, Schengen counts each calendar day of presence, and most state residency tests key on where you spent the night. One rule, applied uniformly, keeps every jurisdiction comparable.

Arrival and departure days (partial days)

The day you arrive and the day you leave are both calendar days of presence under the midnight rule if you are there at midnight — and are not counted if you left before midnight. Some authorities are stricter: the IRS counts any part of a day as a full day of US presence for the substantial presence test, with narrow exceptions (transit under 24 hours, commuters, medical conditions, exempt individuals). Day31 tracks the raw record and applies each jurisdiction's own convention when evaluating its limit, so a day can count for one rule and not another.

Transits and layovers

Changing planes in a country is not the same as being present there. An airside layover where you never clear immigration is not counted as presence by Day31. The IRS takes the same position: presence in the US while in transit between two foreign points for less than 24 hours does not count toward substantial presence. Once you clear the border — even for a night in an airport hotel — the day counts like any other.

Time zones and the date line

Days are counted in local dates, not UTC. Crossing the international date line eastbound can give you the same calendar day twice; westbound can skip one entirely. Day31 resolves each stay against the local time zone of the place you were in, so a Tokyo-to- Honolulu flight that lands "yesterday" does not manufacture an extra day of presence in either country.

Rolling windows vs fixed years

Two shapes of limit exist, and they behave completely differently. Fixed-window rules — the 183-day rule in most countries and states — count days inside a calendar or tax year. Rolling-window rules — Schengen's 90 days in any 180 — look back from every single day, so your allowance tomorrow depends on where you were 179 days ago. Day31 evaluates rolling limits continuously rather than at year-end, which is the only way to get an honest "you may re-enter on this date" answer.

Leap years

A leap year has 366 days, and Day31 counts all of them — February 29 is a day of presence like any other. Thresholds themselves do not change in leap years (183 is still 183, 90-in-180 is still 90-in-180); the window length is defined in days, not in fractions of a year.

Rebuilding history from photo metadata

If you install Day31 after years of travel, your camera roll is the record you already kept. The app can read the capture date and location metadata of photos on your device to reconstruct where you were on past days — a practical way to backfill a timeline without having kept a log. Photos are metadata evidence, not legal proof: keep boarding passes and stamps for anything an authority might dispute, and treat the rebuilt timeline as a strong starting point.

The on-device processing guarantee

All of this counting happens on your iPhone. Your location history, day counts, and photo metadata never leave the device; there is no account and no server that sees them. If you enable backup, it goes to your own iCloud storage under your Apple account — not to us. We hold no certifications to display here; the architecture is the guarantee: there is no copy of your data to request, leak, or sell.

Where the numbers come from

The rules applied here — Schengen's 90/180, the IRS substantial presence formula, the 183-day thresholds, per-state statutory tests — are public law, linked from each calculator and from the jurisdiction guides. Definitions of the terms used above are in the glossary. Rules change; the official source linked from each page is always authoritative over anything written here.

The arithmetic, automated

Day31 for iPhone applies this methodology to your actual whereabouts every day — and warns you before a count becomes a problem.

Download for iOS