Date & Time Tools — Timers, Clocks & Date Maths
Timers and date arithmetic that stay accurate when the tab is in the background.
5 tools · Reviewed by Mimamsa, Founder & Engineer, CodeLint.Dev
Browser-based timers have a well-known failure mode: setInterval is throttled — often to once per second, sometimes to once per minute — when a tab loses focus, so a naive implementation drifts badly the moment you switch away. The timers here track wall-clock time against a fixed start timestamp rather than counting ticks, so a stopwatch left running in a background tab reports the same elapsed time as one you watched throughout.
The date calculator handles the arithmetic that is genuinely hard to do in your head, and harder to do correctly in code: business days between two dates, age in years and months, and adding intervals across month boundaries where the answer depends on convention — one month after 31 January is not a date that exists.
The timestamp utility converts between Unix seconds, milliseconds, ISO 8601 and human-readable formats in any timezone, which is the fastest way to find out whether the value in your log is seconds or milliseconds. If it decodes to 1970, you have the wrong unit by a factor of a thousand.
Timers
Clocks & calculators
Which tool for which question
| Question | Tool |
|---|---|
| How long until a deadline? | Countdown Timer — set a target date |
| How long did that take? | Stopwatch, with laps for segments |
| What time is it for a colleague abroad? | World Clock |
| How many working days between two dates? | Date Calculator |
| Is this timestamp in seconds or milliseconds? | Timestamp Converter — a 1970 result means the wrong unit |
| What will the date be 90 days from now? | Date Calculator |
| How old is someone on a given date? | Date Calculator — age in years, months and days |
Frequently asked questions
- Does the timer keep running if I switch tabs?
- Yes. Elapsed time is computed from a fixed start timestamp rather than by counting interval ticks, so background throttling does not cause drift. The displayed value may update less frequently while hidden, but it corrects itself the instant the tab regains focus.
- Is my Unix timestamp in seconds or milliseconds?
- Count the digits. A current timestamp in seconds is 10 digits; in milliseconds it is 13. If a value decodes to a date in 1970 you have milliseconds being read as seconds; if it lands tens of thousands of years in the future, the reverse. JavaScript’s Date uses milliseconds while most backend languages default to seconds, which is why this mismatch is so common at API boundaries.
- How are business days counted?
- Monday to Friday inclusive, excluding weekends. Public holidays are not deducted, because they vary by country, region and sometimes employer — for contractual deadlines, check the specific holiday calendar that applies.
- Why should I store a timezone name rather than an offset?
- An offset such as "+01:00" describes one instant, not a zone. It cannot tell you what the offset will be next summer, so any future date computed from it is wrong after the next daylight-saving transition. Store the IANA identifier — Europe/London, America/New_York — which carries the full rule history.
- Do these tools work offline?
- Yes. Everything runs in your browser with no server calls, so once a page has loaded the timers, clocks and calculators keep working without a connection.