SITE INFORMATION / PLAIN LANGUAGE

Methodology

Updated

Integer seconds first

TimeCalculator.dev uses integer seconds as the source of truth for duration arithmetic. A duration entry is converted with the relationship days × 86,400 + hours × 3,600 + minutes × 60 + seconds. Addition and subtraction happen on that whole-second total. The result is then split back into days, hours, minutes, and seconds for display.

Carry rules follow ordinary clock units: 60 seconds become one minute, 60 minutes become one hour, and 24 hours become one day. Inputs may deliberately overflow a field, so 90 minutes normalizes to 1 hour 30 minutes rather than being rejected. When a sum is negative, the sign belongs to the complete normalized duration; the component fields are displayed as its absolute magnitude.

Decimal views are derived from the same second total, not used as intermediate values. Decimal days display to at most six decimal places and decimal hours to at most four. Trailing zeros are trimmed. Rounding happens only when those decimal strings are displayed, so a rounded label is never fed back into the duration calculation.

Clock rules

Twelve-hour inputs map 12 AM to hour 00 and 12 PM to hour 12. In a clock-only “between” calculation, an end earlier than the start counts one midnight crossing. An equal start and end means zero, not 24 hours. The page reports when that one-midnight rule was applied.

Clock shifts and duration sums retain signed direction. A subtraction can therefore produce a negative duration, while moving a clock backward reports the previous-day offset as needed. These are arithmetic conventions, not timezone calculations.

Calendar rules

Date calculations convert Gregorian calendar dates to integer Julian Day Numbers (JDN), add or subtract whole days, and convert the result back. The Gregorian leap-year rule is applied: years divisible by four are leap years, except century years unless they are also divisible by 400.

Month movement uses month-end clamping. For example, moving from January 31 to a February without a matching day returns February 28, or February 29 in a leap year. It does not spill the extra days into March.

A workday calculation walks the calendar one day at a time in the requested direction. It can skip Saturday and Sunday and also skip valid dates the user explicitly excludes. The starting date is not counted as the first moved day, and a zero-day move returns the start unchanged. There is no built-in holiday database, so public holidays, shutdowns, and organization-specific closures must be supplied by the user.

Payroll and PTO boundaries

Payroll and paid-time-off results are arithmetic estimates. For payroll, the user classifies the hours, supplies the rate, and sets any threshold the page exposes. The calculator multiplies the categories the user selected; it does not decide which hours legally qualify. Pay lines are rounded to integer cents before they are summed so the displayed gross can be audited in currency units.

PTO calculations likewise use employer-supplied numbers. Accrual per period, completed periods, carryover, used time, and planned time are added or subtracted exactly as shown. The tool does not determine eligibility, caps, expiration, approval, payout, or the length of an employer-defined workday.

Jurisdiction rules differ. The U.S. Department of Labor overtime fact sheet describes federal workweek requirements, while the California Department of Industrial Relations overtime FAQ describes state rules that also include daily circumstances. These references are evidence that a universal automatic classification would be misleading. They are not instructions for a particular situation, and this site does not provide legal advice.

Testing and review

The shared library ships with an automated test suite of 84 cases. Coverage includes Gregorian leap years and month ends, midnight crossings, forward and backward workday walks with exclusions, duration carries and signed results, speed-unit conversions, PTO balance flags, and integer-cent payroll totals. The library source and the full suite are published in our open repository, time-calculator/timecalculator on GitHub. A passing suite checks the published rules against fixed examples; it does not prove that every possible input or browser environment is error-free.

Before release, calculator behavior and copy are checked against this page. A reported correction is reproduced with the supplied inputs, fixed in the engine or presentation layer as appropriate, exercised against the suite, and published with an updated date.

Known limitations

Clock-only durations ignore time zones and daylight saving transitions. They treat a day as 24 hours and compare the clock values shown. The hours-from-now tool follows the device clock and timezone, so a changed device setting changes its reference point. Calendar workday mode has no holiday data. Payroll and PTO tools cannot infer rules that the user did not supply.

Results should be checked against an authoritative schedule, policy, payroll record, or professional source whenever the consequence is more than ordinary arithmetic.