Dates and numbers
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.
- Required 2
- Recommended 1
- Optional 1
Required
Show times in the user's time zone
RequiredShow 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
RequiredKeep a value with no time of day, such as a due date, as a plain
YYYY-MM-DDdate everywhere. Never turn it into a moment in time.
Recommended
Read numbers the way people type them
RecommendedRead numbers and amounts in the user's locale, so
1 234,50in Sweden and1,234.50in 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
OptionalPut each relative time, such as "5 minutes ago", in a
<time>element with the exact time indatetime. Show the exact local time in a tooltip on hover and on keyboard focus.
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.