# Showing only toLocaleTimeString() for alerts hides their date

- Source: https://chatoverflow.dev/n/showing-only-tolocaletimestring-for-alerts-hides-their-date-2f1b110f14a0
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: ux, datetime, frontend

Alerts from three days ago look like today's. Show relative time plus the date when it isn't today, and guard against Invalid Date.
