- Home
- Methodology
Methodology
This page states the standing rules every WhenMath calculation follows, so a specific tool's own page only needs to note where it differs from the default rather than re-explain the whole system. Where a specific tool's page states a different rule for its own domain, that page's statement governs for that calculation.
Calendar system
All calendar arithmetic uses the proleptic Gregorian calendar unless a specific tool states otherwise. Dates before the Gregorian calendar's historical adoption are computed as if it had always been in effect; this is a standard mathematical convention, not a historical claim about which calendar was actually in use on a given date.
Adding a calendar month
Adding a calendar month to a date defaults to constraining the result to the last valid day of the target month: January 31 plus one month becomes February 28, or February 29 in a leap year, rather than rolling over into March. Where it is available, a "preserve end-of-month" alternative is offered and the selected rule is stated in the result rather than left implicit.
Counting days between two dates
Counting the days between a start and an end date defaults to excluding the start date and including the end date, with an explicit inclusive option available. This single choice can shift a result by exactly one day, so it is always stated, never assumed silently.
Business days
Adding business days treats the start date itself as day zero (a Monday plus one business day is Tuesday). A custom workweek and a custom list of excluded dates both override the default Monday-to-Friday, no-holidays assumption when supplied. Public-holiday presets come from a vetted, static calendrical data source; they describe common regional convention, not a legal or contractual determination for any specific employer, court, agency, or jurisdiction, and a user-supplied exclusion list always takes precedence over a preset.
Time zones and daylight saving
Time-zone handling uses IANA time zone identifiers (such as America/Chicago) as the source of truth, never a bare numeric UTC offset, because an offset alone cannot account for a daylight-saving transition. Calculations distinguish an instant in time from a local wall-clock description of it, and explicitly detect the two cases where a local time does not map cleanly to one instant: an ambiguous hour that occurs twice when clocks fall back, and a nonexistent hour that is skipped entirely when clocks spring forward. A time inside either window is flagged rather than silently resolved to a guess.
Leap years and February 29
A leap year is determined by the standard Gregorian rule: divisible by 4, except century years, which must also be divisible by 400. Any calculation involving February 29, including a birthday or anniversary that falls on it, states which convention it used to represent that date in a non-leap year (February 28 or March 1) rather than picking one without saying so.
Rounding and precision
A value is calculated at full precision internally and rounded only for display, using a rule stated on the calculation itself (for example, decimal hours to the nearest hundredth). Where a rounding rule is itself the subject of the question, such as a timecard rounding policy, the rule is treated as an explicit user-controlled input rather than a fixed site-wide default.
Limitations
WhenMath performs calendrical and temporal arithmetic. It does not determine legal age, legal or contractual deadlines, payroll compliance, court filing deadlines, or any other outcome that depends on a specific jurisdiction's, employer's, or institution's own rules. Holiday and daylight-saving data reflect a bundled, dated source and are not a live feed; where a region's rules have changed very recently, verify against an authoritative local source before relying on a result for a consequential decision.
How this changes over time
A change to any rule on this page, or to the underlying time-zone or holiday data source it depends on, is treated as a change to the product's methodology, not a routine content edit, and is recorded as such in the project's own change history.