---
title: "Dates and numbers · Agent Wranglers"
url: https://agentwranglers.se/playbook/app-ui/dates-and-numbers
updated: 2026-10-20
licence: "All rights reserved"
---

# Dates and numbers

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

> Show times in the user's own time zone, keep calendar dates as dates, and read numbers the way people type them. Most off-by-one-day bugs start here.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers app interface playbook: https://agentwranglers.se/playbook/app-ui/dates-and-numbers`.

## Required

- [Show times in the user's time zone](https://agentwranglers.se/playbook/app-ui/dates-and-numbers/user-time-zone): Show every moment in time in the user's chosen time zone, and name the zone wherever people in different zones see the same screen.
- [Keep calendar dates as dates](https://agentwranglers.se/playbook/app-ui/dates-and-numbers/calendar-dates): Keep a value with no time of day, such as a due date, as a plain `YYYY-MM-DD` date everywhere. Never turn it into a moment in time.

## Recommended

- [Read numbers the way people type them](https://agentwranglers.se/playbook/app-ui/dates-and-numbers/locale-number-input): Read numbers and amounts in the user's locale, so `1 234,50` in Sweden and `1,234.50` in the US both mean the same amount. Never parse money as a floating-point number.

## Optional

- [Show relative times with the exact time beside them](https://agentwranglers.se/playbook/app-ui/dates-and-numbers/relative-times): Put each relative time, such as "5 minutes ago", in a `<time>` element with the exact time in `datetime`. Show the exact local time in a tooltip on hover and on keyboard focus.

- Previous: [Data views](https://agentwranglers.se/playbook/app-ui/data-views)
- Next: [Forms](https://agentwranglers.se/playbook/app-ui/forms)
- [All chapters](https://agentwranglers.se/playbook/app-ui)
